diff --git a/dev/entry/.buildinfo b/dev/entry/.buildinfo new file mode 100644 index 0000000000..b65f664be6 --- /dev/null +++ b/dev/entry/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: dca9544f5475ec2eee466203b6322170 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/dev/entry/.doctrees/api_doc/archive/index.doctree b/dev/entry/.doctrees/api_doc/archive/index.doctree new file mode 100644 index 0000000000..eccb755d4b Binary files /dev/null and b/dev/entry/.doctrees/api_doc/archive/index.doctree differ diff --git a/dev/entry/.doctrees/api_doc/cache/delete.doctree b/dev/entry/.doctrees/api_doc/cache/delete.doctree new file mode 100644 index 0000000000..20d41cb0c8 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/cache/delete.doctree differ diff --git a/dev/entry/.doctrees/api_doc/cache/index.doctree b/dev/entry/.doctrees/api_doc/cache/index.doctree new file mode 100644 index 0000000000..2864322d88 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/cache/index.doctree differ diff --git a/dev/entry/.doctrees/api_doc/config/index.doctree b/dev/entry/.doctrees/api_doc/config/index.doctree new file mode 100644 index 0000000000..dd797234b1 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/config/index.doctree differ diff --git a/dev/entry/.doctrees/api_doc/config/meta.doctree b/dev/entry/.doctrees/api_doc/config/meta.doctree new file mode 100644 index 0000000000..c1cbe99a77 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/config/meta.doctree differ diff --git a/dev/entry/.doctrees/api_doc/entry/base.doctree b/dev/entry/.doctrees/api_doc/entry/base.doctree new file mode 100644 index 0000000000..5637aadd80 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/entry/base.doctree differ diff --git a/dev/entry/.doctrees/api_doc/entry/cli.doctree b/dev/entry/.doctrees/api_doc/entry/cli.doctree new file mode 100644 index 0000000000..2eac0c8bce Binary files /dev/null and b/dev/entry/.doctrees/api_doc/entry/cli.doctree differ diff --git a/dev/entry/.doctrees/api_doc/entry/clone.doctree b/dev/entry/.doctrees/api_doc/entry/clone.doctree new file mode 100644 index 0000000000..4ac47971e5 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/entry/clone.doctree differ diff --git a/dev/entry/.doctrees/api_doc/entry/dispatch.doctree b/dev/entry/.doctrees/api_doc/entry/dispatch.doctree new file mode 100644 index 0000000000..c1ef4e2dab Binary files /dev/null and b/dev/entry/.doctrees/api_doc/entry/dispatch.doctree differ diff --git a/dev/entry/.doctrees/api_doc/entry/download.doctree b/dev/entry/.doctrees/api_doc/entry/download.doctree new file mode 100644 index 0000000000..4290afc0a9 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/entry/download.doctree differ diff --git a/dev/entry/.doctrees/api_doc/entry/index.doctree b/dev/entry/.doctrees/api_doc/entry/index.doctree new file mode 100644 index 0000000000..60bcb3c54c Binary files /dev/null and b/dev/entry/.doctrees/api_doc/entry/index.doctree differ diff --git a/dev/entry/.doctrees/api_doc/entry/index_.doctree b/dev/entry/.doctrees/api_doc/entry/index_.doctree new file mode 100644 index 0000000000..b33eec6169 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/entry/index_.doctree differ diff --git a/dev/entry/.doctrees/api_doc/entry/ls.doctree b/dev/entry/.doctrees/api_doc/entry/ls.doctree new file mode 100644 index 0000000000..95c7ad70c0 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/entry/ls.doctree differ diff --git a/dev/entry/.doctrees/api_doc/entry/ls_repo.doctree b/dev/entry/.doctrees/api_doc/entry/ls_repo.doctree new file mode 100644 index 0000000000..a3eb368812 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/entry/ls_repo.doctree differ diff --git a/dev/entry/.doctrees/api_doc/entry/rollback.doctree b/dev/entry/.doctrees/api_doc/entry/rollback.doctree new file mode 100644 index 0000000000..7b524e88b7 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/entry/rollback.doctree differ diff --git a/dev/entry/.doctrees/api_doc/entry/upload.doctree b/dev/entry/.doctrees/api_doc/entry/upload.doctree new file mode 100644 index 0000000000..a39a5630fb Binary files /dev/null and b/dev/entry/.doctrees/api_doc/entry/upload.doctree differ diff --git a/dev/entry/.doctrees/api_doc/entry/whoami.doctree b/dev/entry/.doctrees/api_doc/entry/whoami.doctree new file mode 100644 index 0000000000..cb070aa25a Binary files /dev/null and b/dev/entry/.doctrees/api_doc/entry/whoami.doctree differ diff --git a/dev/entry/.doctrees/api_doc/index/fetch.doctree b/dev/entry/.doctrees/api_doc/index/fetch.doctree new file mode 100644 index 0000000000..7ecf1e6332 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/index/fetch.doctree differ diff --git a/dev/entry/.doctrees/api_doc/index/index.doctree b/dev/entry/.doctrees/api_doc/index/index.doctree new file mode 100644 index 0000000000..b914cdaf5f Binary files /dev/null and b/dev/entry/.doctrees/api_doc/index/index.doctree differ diff --git a/dev/entry/.doctrees/api_doc/index/make.doctree b/dev/entry/.doctrees/api_doc/index/make.doctree new file mode 100644 index 0000000000..64ed80831b Binary files /dev/null and b/dev/entry/.doctrees/api_doc/index/make.doctree differ diff --git a/dev/entry/.doctrees/api_doc/index/validate.doctree b/dev/entry/.doctrees/api_doc/index/validate.doctree new file mode 100644 index 0000000000..aa7aea4494 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/index/validate.doctree differ diff --git a/dev/entry/.doctrees/api_doc/operate/base.doctree b/dev/entry/.doctrees/api_doc/operate/base.doctree new file mode 100644 index 0000000000..15e5037d96 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/operate/base.doctree differ diff --git a/dev/entry/.doctrees/api_doc/operate/download.doctree b/dev/entry/.doctrees/api_doc/operate/download.doctree new file mode 100644 index 0000000000..7791039c92 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/operate/download.doctree differ diff --git a/dev/entry/.doctrees/api_doc/operate/index.doctree b/dev/entry/.doctrees/api_doc/operate/index.doctree new file mode 100644 index 0000000000..eedd20fbcb Binary files /dev/null and b/dev/entry/.doctrees/api_doc/operate/index.doctree differ diff --git a/dev/entry/.doctrees/api_doc/operate/upload.doctree b/dev/entry/.doctrees/api_doc/operate/upload.doctree new file mode 100644 index 0000000000..c2a6dc7a5b Binary files /dev/null and b/dev/entry/.doctrees/api_doc/operate/upload.doctree differ diff --git a/dev/entry/.doctrees/api_doc/operate/validate.doctree b/dev/entry/.doctrees/api_doc/operate/validate.doctree new file mode 100644 index 0000000000..cce5926dbd Binary files /dev/null and b/dev/entry/.doctrees/api_doc/operate/validate.doctree differ diff --git a/dev/entry/.doctrees/api_doc/repository/base.doctree b/dev/entry/.doctrees/api_doc/repository/base.doctree new file mode 100644 index 0000000000..583ed20048 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/repository/base.doctree differ diff --git a/dev/entry/.doctrees/api_doc/repository/clone.doctree b/dev/entry/.doctrees/api_doc/repository/clone.doctree new file mode 100644 index 0000000000..cf589dd685 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/repository/clone.doctree differ diff --git a/dev/entry/.doctrees/api_doc/repository/index.doctree b/dev/entry/.doctrees/api_doc/repository/index.doctree new file mode 100644 index 0000000000..f8376bf338 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/repository/index.doctree differ diff --git a/dev/entry/.doctrees/api_doc/repository/rollback.doctree b/dev/entry/.doctrees/api_doc/repository/rollback.doctree new file mode 100644 index 0000000000..c515598e75 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/repository/rollback.doctree differ diff --git a/dev/entry/.doctrees/api_doc/utils/binary.doctree b/dev/entry/.doctrees/api_doc/utils/binary.doctree new file mode 100644 index 0000000000..d7874a39b2 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/utils/binary.doctree differ diff --git a/dev/entry/.doctrees/api_doc/utils/download.doctree b/dev/entry/.doctrees/api_doc/utils/download.doctree new file mode 100644 index 0000000000..8b46e1352f Binary files /dev/null and b/dev/entry/.doctrees/api_doc/utils/download.doctree differ diff --git a/dev/entry/.doctrees/api_doc/utils/index.doctree b/dev/entry/.doctrees/api_doc/utils/index.doctree new file mode 100644 index 0000000000..b5dd87e2fd Binary files /dev/null and b/dev/entry/.doctrees/api_doc/utils/index.doctree differ diff --git a/dev/entry/.doctrees/api_doc/utils/path.doctree b/dev/entry/.doctrees/api_doc/utils/path.doctree new file mode 100644 index 0000000000..bfac87c8fd Binary files /dev/null and b/dev/entry/.doctrees/api_doc/utils/path.doctree differ diff --git a/dev/entry/.doctrees/api_doc/utils/tqdm_.doctree b/dev/entry/.doctrees/api_doc/utils/tqdm_.doctree new file mode 100644 index 0000000000..26c684fad5 Binary files /dev/null and b/dev/entry/.doctrees/api_doc/utils/tqdm_.doctree differ diff --git a/dev/entry/.doctrees/api_doc/utils/walk.doctree b/dev/entry/.doctrees/api_doc/utils/walk.doctree new file mode 100644 index 0000000000..4259680dca Binary files /dev/null and b/dev/entry/.doctrees/api_doc/utils/walk.doctree differ diff --git a/dev/entry/.doctrees/environment.pickle b/dev/entry/.doctrees/environment.pickle new file mode 100644 index 0000000000..87b26816b2 Binary files /dev/null and b/dev/entry/.doctrees/environment.pickle differ diff --git a/dev/entry/.doctrees/index.doctree b/dev/entry/.doctrees/index.doctree new file mode 100644 index 0000000000..d20344a83a Binary files /dev/null and b/dev/entry/.doctrees/index.doctree differ diff --git a/dev/entry/.doctrees/information/environment.doctree b/dev/entry/.doctrees/information/environment.doctree new file mode 100644 index 0000000000..517b26c610 Binary files /dev/null and b/dev/entry/.doctrees/information/environment.doctree differ diff --git a/dev/entry/.doctrees/information/environment.result.doctree b/dev/entry/.doctrees/information/environment.result.doctree new file mode 100644 index 0000000000..d6a793a54c Binary files /dev/null and b/dev/entry/.doctrees/information/environment.result.doctree differ diff --git a/dev/entry/.doctrees/nbsphinx/information/environment.ipynb b/dev/entry/.doctrees/nbsphinx/information/environment.ipynb new file mode 100644 index 0000000000..53e3b5dd01 --- /dev/null +++ b/dev/entry/.doctrees/nbsphinx/information/environment.ipynb @@ -0,0 +1,114 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "# Run Environment Information" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "Here is the information from the running environment." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "execution": { + "iopub.execute_input": "2024-07-21T07:52:12.758855Z", + "iopub.status.busy": "2024-07-21T07:52:12.758278Z", + "iopub.status.idle": "2024-07-21T07:52:13.926335Z", + "shell.execute_reply": "2024-07-21T07:52:13.925667Z" + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "OS: Linux-6.5.0-1023-azure-x86_64-with-glibc2.34\n", + "Python: CPython 3.8.18\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "CPU Brand: AMD EPYC 7763 64-Core Processor\n", + "CPU Count: 4\n", + "CPU Freq: 2923.05675 MHz\n", + "Memory Size: 15.606 GiB\n", + "Has CUDA: No\n" + ] + } + ], + "source": [ + "import os\n", + "import platform\n", + "import shutil\n", + "\n", + "import cpuinfo\n", + "import psutil\n", + "from hbutils.scale import size_to_bytes_str\n", + "\n", + "print('OS:', platform.platform())\n", + "print('Python:', platform.python_implementation(), platform.python_version())\n", + "print('CPU Brand:', cpuinfo.get_cpu_info()[\"brand_raw\"])\n", + "print('CPU Count:', os.cpu_count())\n", + "print('CPU Freq:', psutil.cpu_freq().current, 'MHz')\n", + "print('Memory Size:', size_to_bytes_str(psutil.virtual_memory().total, precision=3))\n", + "print('Has CUDA:', 'Yes' if shutil.which('nvidia-smi') else 'No')" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "Please note that, this information in deployed documentation is automatically executed on Github Action. Therefore, some performance data may be different with your local environment" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.18" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/dev/entry/.doctrees/nbsphinx/information/environment.result.ipynb b/dev/entry/.doctrees/nbsphinx/information/environment.result.ipynb new file mode 100644 index 0000000000..90263a1368 --- /dev/null +++ b/dev/entry/.doctrees/nbsphinx/information/environment.result.ipynb @@ -0,0 +1,114 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "# Run Environment Information" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "Here is the information from the running environment." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "execution": { + "iopub.execute_input": "2024-07-21T07:22:54.938901Z", + "iopub.status.busy": "2024-07-21T07:22:54.938694Z", + "iopub.status.idle": "2024-07-21T07:22:56.111878Z", + "shell.execute_reply": "2024-07-21T07:22:56.111130Z" + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "OS: Linux-6.5.0-1023-azure-x86_64-with-glibc2.34\n", + "Python: CPython 3.8.18\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "CPU Brand: AMD EPYC 7763 64-Core Processor\n", + "CPU Count: 4\n", + "CPU Freq: 2976.9235 MHz\n", + "Memory Size: 15.606 GiB\n", + "Has CUDA: No\n" + ] + } + ], + "source": [ + "import os\n", + "import platform\n", + "import shutil\n", + "\n", + "import cpuinfo\n", + "import psutil\n", + "from hbutils.scale import size_to_bytes_str\n", + "\n", + "print('OS:', platform.platform())\n", + "print('Python:', platform.python_implementation(), platform.python_version())\n", + "print('CPU Brand:', cpuinfo.get_cpu_info()[\"brand_raw\"])\n", + "print('CPU Count:', os.cpu_count())\n", + "print('CPU Freq:', psutil.cpu_freq().current, 'MHz')\n", + "print('Memory Size:', size_to_bytes_str(psutil.virtual_memory().total, precision=3))\n", + "print('Has CUDA:', 'Yes' if shutil.which('nvidia-smi') else 'No')" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "Please note that, this information in deployed documentation is automatically executed on Github Action. Therefore, some performance data may be different with your local environment" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.18" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/dev/entry/.doctrees/tutorials/installation/index.doctree b/dev/entry/.doctrees/tutorials/installation/index.doctree new file mode 100644 index 0000000000..b650481f4f Binary files /dev/null and b/dev/entry/.doctrees/tutorials/installation/index.doctree differ diff --git a/dev/entry/.doctrees/tutorials/quick_start/index.doctree b/dev/entry/.doctrees/tutorials/quick_start/index.doctree new file mode 100644 index 0000000000..bd761147ed Binary files /dev/null and b/dev/entry/.doctrees/tutorials/quick_start/index.doctree differ diff --git a/dev/entry/.nojekyll b/dev/entry/.nojekyll new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dev/entry/_modules/hfutils/archive/base.html b/dev/entry/_modules/hfutils/archive/base.html new file mode 100644 index 0000000000..42b636589b --- /dev/null +++ b/dev/entry/_modules/hfutils/archive/base.html @@ -0,0 +1,275 @@ + + + + + + hfutils.archive.base — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.archive.base

+import os.path
+import warnings
+from typing import List, Dict, Tuple, Callable, Optional
+
+_KNOWN_ARCHIVE_TYPES: Dict[str, Tuple[List[str], Callable, Callable]] = {}
+
+
+
[docs]def register_archive_type(name: str, exts: List[str], fn_pack: Callable, fn_unpack: Callable): + """ + Register a custom archive type with associated file extensions and packing/unpacking functions. + + :param name: The name of the archive type. + :type name: str + :param exts: A list of file extensions associated with the archive type. + :type exts: List[str] + :param fn_pack: The packing function that takes a directory and an archive filename as input and creates an archive. + :type fn_pack: Callable + :param fn_unpack: The unpacking function that takes an archive filename and a directory as input and extracts the archive. + :type fn_unpack: Callable + """ + if len(exts) == 0: + raise ValueError(f'At least one extension name for archive type {name!r} should be provided.') + _KNOWN_ARCHIVE_TYPES[name] = (exts, fn_pack, fn_unpack)
+ + +
[docs]def get_archive_extname(type_name: str) -> str: + """ + Get the file extension associated with a registered archive type. + + :param type_name: The name of the archive type. + :type type_name: str + + :return: The file extension associated with the archive type. + :rtype: str + :raises ValueError: If the archive type is not registered. + """ + if type_name in _KNOWN_ARCHIVE_TYPES: + exts, _, _ = _KNOWN_ARCHIVE_TYPES[type_name] + return exts[0] + else: + raise ValueError(f'Unknown archive type - {type_name!r}.')
+ + +
[docs]def archive_pack(type_name: str, directory: str, archive_file: str, silent: bool = False, clear: bool = False): + """ + Pack a directory into an archive file using the specified archive type. + + :param type_name: The name of the archive type. + :type type_name: str + :param directory: The directory to pack. + :type directory: str + :param archive_file: The filename of the resulting archive. + :type archive_file: str + :param silent: If True, suppress warnings during the packing process. + :type silent: bool + :param clear: If True, remove existing files when packing. + :type clear: bool + + :return: The path to the created archive file. + :rtype: str + """ + exts, fn_pack, _ = _KNOWN_ARCHIVE_TYPES[type_name] + if not any(os.path.normcase(archive_file).endswith(extname) for extname in exts): + warnings.warn(f'The archive type {type_name!r} should be one of the {exts!r}, ' + f'but file name {archive_file!r} is assigned. ' + f'We strongly recommend using a regular extension name for the archive file.') + + return fn_pack(directory, archive_file, silent=silent, clear=clear)
+ + +
[docs]def get_archive_type(archive_file: str) -> str: + """ + Determine the archive type based on the file extension. + + :param archive_file: The filename of the archive. + :type archive_file: str + + :return: The name of the archive type. + :rtype: str + :raises ValueError: If the file extension is not associated with any registered archive type. + """ + archive_file = os.path.normcase(archive_file) + for type_name, (exts, _, _) in _KNOWN_ARCHIVE_TYPES.items(): + if any(archive_file.endswith(extname) for extname in exts): + return type_name + + raise ValueError(f'Unknown type of archive file {archive_file!r}.')
+ + +
[docs]def archive_unpack(archive_file: str, directory: str, silent: bool = False, password: Optional[str] = None): + """ + Unpack an archive file into a directory using the specified archive type. + + :param archive_file: The filename of the archive. + :type archive_file: str + :param directory: The directory to unpack the contents into. + :type directory: str + :param silent: If True, suppress warnings during the unpacking process. + :type silent: bool + :param password: The password to extract the archive file. + :type password: str, optional + + :return: The path to the unpacked directory. + :rtype: str + """ + type_name = get_archive_type(archive_file) + _, _, fn_unpack = _KNOWN_ARCHIVE_TYPES[type_name] + return fn_unpack(archive_file, directory, silent=silent, password=password)
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/cache/delete.html b/dev/entry/_modules/hfutils/cache/delete.html new file mode 100644 index 0000000000..a1475ed0d6 --- /dev/null +++ b/dev/entry/_modules/hfutils/cache/delete.html @@ -0,0 +1,324 @@ + + + + + + hfutils.cache.delete — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.cache.delete

+import logging
+from functools import partial
+from typing import Optional, Callable
+
+from huggingface_hub import scan_cache_dir, CachedRepoInfo, CachedRevisionInfo, DeleteCacheStrategy, CacheNotFound
+
+
+def _collect_revisions(fn: Callable[[CachedRepoInfo, CachedRevisionInfo], bool], cache_dir: Optional[str] = None) \
+        -> DeleteCacheStrategy:
+    """
+    Collects revisions from the cache that match a specific condition defined by the function `fn`.
+
+    :param fn: A callable that takes a CachedRepoInfo and CachedRevisionInfo and returns a boolean.
+               If True, the revision matches the condition.
+    :type fn: Callable[[CachedRepoInfo, CachedRevisionInfo], bool]
+    :param cache_dir: The directory where the cache is stored. If None, uses the default directory.
+    :type cache_dir: Optional[str]
+    :return: A strategy for deleting the collected revisions.
+    :rtype: DeleteCacheStrategy
+    """
+    revision_hashes = set()
+    scan = scan_cache_dir(cache_dir=cache_dir)
+    for repo in scan.repos:
+        for revision in repo.revisions:
+            if fn(repo, revision):
+                revision_hashes.add(revision.commit_hash)
+    logging.info(f'Revisions to delete from huggingface cache: {sorted(revision_hashes)}')
+    return scan.delete_revisions(*revision_hashes)
+
+
+def _is_repo_match(repo: CachedRepoInfo, repo_id: Optional[str] = None, repo_type: Optional[str] = None) -> bool:
+    """
+    Checks if a repository matches the specified ID and type.
+
+    :param repo: The repository information.
+    :type repo: CachedRepoInfo
+    :param repo_id: The ID of the repository to match. If None, matches any ID.
+    :type repo_id: Optional[str]
+    :param repo_type: The type of the repository to match. If None, matches any type.
+    :type repo_type: Optional[str]
+    :return: True if the repository matches the conditions, False otherwise.
+    :rtype: bool
+    """
+    if repo_id and repo_type:
+        return repo.repo_id == repo_id and repo.repo_type == repo_type
+    elif repo_id:
+        return repo.repo_id == repo_id
+    elif repo_type:
+        return repo.repo_type == repo_type
+    else:
+        return True
+
+
+def _is_detached_revision(
+        repo: CachedRepoInfo, revision: CachedRevisionInfo,
+        repo_id: Optional[str] = None, repo_type: Optional[str] = None,
+) -> bool:
+    """
+    Determines if a revision is detached (no references) and matches the specified repository ID and type.
+
+    :param repo: The repository information.
+    :type repo: CachedRepoInfo
+    :param revision: The revision information.
+    :type revision: CachedRevisionInfo
+    :param repo_id: The repository ID to match. If None, matches any ID.
+    :type repo_id: Optional[str]
+    :param repo_type: The repository type to match. If None, matches any type.
+    :type repo_type: Optional[str]
+    :return: True if the revision is detached and matches the repository conditions, False otherwise.
+    :rtype: bool
+    """
+    if len(revision.refs) == 0:
+        return _is_repo_match(repo, repo_id, repo_type)
+    else:
+        return False
+
+
+
[docs]def delete_detached_cache( + repo_id: Optional[str] = None, repo_type: Optional[str] = None, + cache_dir: Optional[str] = None +): + """ + Deletes all detached revisions from the cache that match the specified repository ID and type. + + :param repo_id: The repository ID to match. If None, matches any ID. + :type repo_id: Optional[str] + :param repo_type: The repository type to match. If None, matches any type. + :type repo_type: Optional[str] + :param cache_dir: The directory where the cache is stored. If None, uses the default directory. + :type cache_dir: Optional[str] + """ + try: + # noinspection PyTypeChecker + strategy = _collect_revisions( + fn=partial( + _is_detached_revision, + repo_id=repo_id, + repo_type=repo_type, + ), + cache_dir=cache_dir, + ) + logging.info(f'{strategy.expected_freed_size_str} space will be freed.') + strategy.execute() + except CacheNotFound: + logging.info('No cache file found.')
+ + +def _is_selected_revision( + repo: CachedRepoInfo, revision: CachedRevisionInfo, + repo_id: Optional[str] = None, repo_type: Optional[str] = None, +) -> bool: + """ + Determines if a revision matches the specified repository ID and type. + + :param repo: The repository information. + :type repo: CachedRepoInfo + :param revision: The revision information. + :type revision: CachedRevisionInfo + :param repo_id: The repository ID to match. If None, matches any ID. + :type repo_id: Optional[str] + :param repo_type: The repository type to match. If None, matches any type. + :type repo_type: Optional[str] + :return: True if the revision matches the repository conditions, False otherwise. + :rtype: bool + """ + _ = repo, revision + return _is_repo_match(repo, repo_id, repo_type) + + +
[docs]def delete_cache( + repo_id: Optional[str] = None, repo_type: Optional[str] = None, + cache_dir: Optional[str] = None +): + """ + Deletes all revisions from the cache that match the specified repository ID and type. + + :param repo_id: The repository ID to match. If None, matches any ID. + :type repo_id: Optional[str] + :param repo_type: The repository type to match. If None, matches any type. + :type repo_type: Optional[str] + :param cache_dir: The directory where the cache is stored. If None, uses the default directory. + :type cache_dir: Optional[str] + """ + try: + # noinspection PyTypeChecker + strategy = _collect_revisions( + fn=partial( + _is_selected_revision, + repo_id=repo_id, + repo_type=repo_type, + ), + cache_dir=cache_dir, + ) + logging.info(f'{strategy.expected_freed_size_str} space will be freed.') + strategy.execute() + except CacheNotFound: + logging.info('No cache file found.')
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/entry/base.html b/dev/entry/_modules/hfutils/entry/base.html new file mode 100644 index 0000000000..893b4e64a0 --- /dev/null +++ b/dev/entry/_modules/hfutils/entry/base.html @@ -0,0 +1,293 @@ + + + + + + hfutils.entry.base — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.entry.base

+import builtins
+import itertools
+import os
+import sys
+import traceback
+from functools import wraps, partial
+from typing import Optional, IO, Callable
+
+import click
+from click.exceptions import ClickException
+
+CONTEXT_SETTINGS = dict(
+    help_option_names=['-h', '--help']
+)
+
+
+
[docs]class ClickWarningException(ClickException): + """ + Custom exception class for displaying warnings in yellow color. + + :param message: The error message. + :type message: str + """ + +
[docs] def show(self, file: Optional[IO] = None) -> None: + """ + Display the warning message in yellow. + + :param file: File to write the output to. + :type file: Optional[IO] + """ + click.secho(self.format_message(), fg='yellow', file=sys.stderr)
+ + +
[docs]class ClickErrorException(ClickException): + """ + Custom exception class for displaying errors in red color. + + :param message: The error message. + :type message: str + """ + +
[docs] def show(self, file: Optional[IO] = None) -> None: + """ + Display the error message in red. + + :param file: File to write the output to. + :type file: Optional[IO] + """ + click.secho(self.format_message(), fg='red', file=sys.stderr)
+ + + + + +
[docs]class KeyboardInterrupted(ClickWarningException): + """ + Exception class for handling keyboard interruptions. + + :param msg: Custom message to display. + :type msg: Optional[str] + """ + exit_code = 0x7 + +
[docs] def __init__(self, msg=None): + """ + Initialize the exception. + + :param msg: Custom message to display. + :type msg: Optional[str] + """ + ClickWarningException.__init__(self, msg or 'Interrupted.')
+ + +
[docs]def command_wrap(): + """ + Decorator for wrapping Click commands. + + This decorator catches exceptions and provides consistent error handling. + + :return: Decorator function. + :rtype: Callable + """ + + def _decorator(func): + @wraps(func) + def _new_func(*args, **kwargs): + try: + return func(*args, **kwargs) + except ClickException: + raise + except KeyboardInterrupt: + raise KeyboardInterrupted + except BaseException as err: + click.secho('Unexpected error found when running hfutils!', fg='red', file=sys.stderr) + print_exception(err, partial(click.secho, fg='red', file=sys.stderr)) + sys.exit(0x1) + + return _new_func + + return _decorator
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/entry/dispatch.html b/dev/entry/_modules/hfutils/entry/dispatch.html new file mode 100644 index 0000000000..352c421e1b --- /dev/null +++ b/dev/entry/_modules/hfutils/entry/dispatch.html @@ -0,0 +1,213 @@ + + + + + + hfutils.entry.dispatch — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.entry.dispatch

+import click
+from click.core import Context, Option
+
+from .base import CONTEXT_SETTINGS
+from ..config.meta import __TITLE__, __VERSION__, __AUTHOR__, __AUTHOR_EMAIL__, __DESCRIPTION__
+
+_raw_authors = [item.strip() for item in __AUTHOR__.split(',') if item.strip()]
+_raw_emails = [item.strip() for item in __AUTHOR_EMAIL__.split(',')]
+if len(_raw_emails) < len(_raw_authors):  # pragma: no cover
+    _raw_emails += [None] * (len(_raw_authors) - len(_raw_emails))
+elif len(_raw_emails) > len(_raw_authors):  # pragma: no cover
+    _raw_emails[len(_raw_authors) - 1] = tuple(_raw_emails[len(_raw_authors) - 1:])
+    del _raw_emails[len(_raw_authors):]
+
+_author_tuples = [
+    (author, tuple([item for item in (email if isinstance(email, tuple) else ((email,) if email else ())) if item]))
+    for author, email in zip(_raw_authors, _raw_emails)
+]
+_authors = [
+    author if not emails else '{author} ({emails})'.format(author=author, emails=', '.join(emails))
+    for author, emails in _author_tuples
+]
+
+
+# noinspection PyUnusedLocal
+
+
+
+@click.group(context_settings=CONTEXT_SETTINGS, help=__DESCRIPTION__)
+@click.option('-v', '--version', is_flag=True,
+              callback=print_version, expose_value=False, is_eager=True,
+              help="Show hfutils' version information.")
+def hfutilcli():
+    pass  # pragma: no cover
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/entry/download.html b/dev/entry/_modules/hfutils/entry/download.html new file mode 100644 index 0000000000..7cc7141e4c --- /dev/null +++ b/dev/entry/_modules/hfutils/entry/download.html @@ -0,0 +1,293 @@ + + + + + + hfutils.entry.download — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.entry.download

+import os
+import warnings
+from typing import Optional
+
+import click
+
+from .base import CONTEXT_SETTINGS, command_wrap, ClickErrorException
+from ..operate import download_file_to_file, download_archive_as_directory, download_directory_as_directory
+from ..operate.base import REPO_TYPES, RepoTypeTyping
+
+
+
[docs]class NoRemotePathAssignedWithDownload(ClickErrorException): + """ + Custom exception class for indicating that no remote path in the repository is assigned. + """ + exit_code = 0x11
+ + +def _add_download_subcommand(cli: click.Group) -> click.Group: + """ + Add the 'download' subcommand to the CLI. + + :param cli: The Click CLI application. + :type cli: click.Group + :return: The modified Click CLI application. + :rtype: click.Group + """ + + @cli.command('download', help='Download data from HuggingFace.\n\n' + 'Set environment $HF_TOKEN to use your own access token.', + context_settings=CONTEXT_SETTINGS) + @click.option('-r', '--repository', 'repo_id', type=str, required=True, + help='Repository to download from.') + @click.option('-t', '--type', 'repo_type', type=click.Choice(REPO_TYPES), default='dataset', + help='Type of the HuggingFace repository.', show_default=True) + @click.option('-f', '--filename', 'file_in_repo', type=str, default=None, + help='File in repository to download.') + @click.option('-a', '--archive', 'archive_in_repo', type=str, default=None, + help='Archive file in repository to download and extract from') + @click.option('-d', '--directory', 'dir_in_repo', type=str, default=None, + help='Directory in repository to download the full directory tree.') + @click.option('-o', '--output', 'output_path', type=str, required=True, + help='Output path for download.') + @click.option('-R', '--revision', 'revision', type=str, default='main', + help='Revision of repository.', show_default=True) + @click.option('-n', '--max_workers', 'max_workers', type=int, default=8, + help='Max threads to download.', show_default=True) + @click.option('-p', '--password', 'password', type=str, default=None, + help='Password for the archive file. Only applied when -a is used.', show_default=True) + @click.option('--tmpdir', 'tmpdir', type=str, default=None, + help='Use custom temporary Directory.', show_default=True) + @command_wrap() + def download(repo_id: str, repo_type: RepoTypeTyping, + file_in_repo: Optional[str], archive_in_repo: Optional[str], dir_in_repo: Optional[str], + output_path: str, revision: str, max_workers: int, password: Optional[str], tmpdir: Optional[str]): + """ + Download data from HuggingFace repositories. + + :param repo_id: Repository to download from. + :type repo_id: str + :param repo_type: Type of the HuggingFace repository. + :type repo_type: RepoTypeTyping + :param file_in_repo: File in repository to download. + :type file_in_repo: Optional[str] + :param archive_in_repo: Archive file in repository to download and extract from. + :type archive_in_repo: Optional[str] + :param dir_in_repo: Directory in repository to download the full directory tree. + :type dir_in_repo: Optional[str] + :param output_path: Output path for download. + :type output_path: str + :param revision: Revision of repository. + :type revision: str + :param max_workers: Max workers to download + :type max_workers: int + :param password: Password for the archive file. Only applied when -a is used. + :type password: str, optional + :param tmpdir: Use custom temporary Directory. + :type tmpdir: str, optional + """ + if tmpdir: + os.environ['TMPDIR'] = tmpdir + + if not file_in_repo and not archive_in_repo and not dir_in_repo: + raise NoRemotePathAssignedWithDownload('No remote path in repository assigned.\n' + 'One of the -f, -a, or -d option is required.') + + if file_in_repo: + if archive_in_repo: + warnings.warn('File in repository assigned, value of -a option will be ignored.') + if dir_in_repo: + warnings.warn('File in repository assigned, value of -d option will be ignored.') + download_file_to_file( + local_file=output_path, + repo_id=repo_id, + file_in_repo=file_in_repo, + repo_type=repo_type, + revision=revision, + ) + + elif archive_in_repo: + if dir_in_repo: + warnings.warn('Archive in repository assigned, value of -d option will be ignored.') + download_archive_as_directory( + local_directory=output_path, + repo_id=repo_id, + file_in_repo=archive_in_repo, + repo_type=repo_type, + revision=revision, + password=password, + ) + + elif dir_in_repo: + download_directory_as_directory( + local_directory=output_path, + repo_id=repo_id, + dir_in_repo=dir_in_repo, + repo_type=repo_type, + revision=revision, + silent=False, + max_workers=max_workers, + ) + + else: + assert False, 'Should not reach this line, it must be a bug!' # pragma: no cover + + return cli +
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/entry/ls.html b/dev/entry/_modules/hfutils/entry/ls.html new file mode 100644 index 0000000000..307305dafc --- /dev/null +++ b/dev/entry/_modules/hfutils/entry/ls.html @@ -0,0 +1,356 @@ + + + + + + hfutils.entry.ls — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.entry.ls

+import mimetypes
+import os.path
+from enum import Enum, unique
+from typing import Union, List
+
+import click
+import tzlocal
+from huggingface_hub.hf_api import RepoFolder, RepoFile
+
+from .base import CONTEXT_SETTINGS
+from ..operate.base import REPO_TYPES, get_hf_client
+
+mimetypes.add_type('image/webp', '.webp')
+
+
+
[docs]@unique +class ListItemType(Enum): + """ + Enum class representing different types of list items. + """ + + FILE = 0x1 + FOLDER = 0x2 + IMAGE = 0x3 + ARCHIVE = 0x4 + MODEL = 0x5 + DATA = 0x6 + + @property + def render_color(self): + """ + Get the render color based on the item type. + + :return: The render color for the item type. + :rtype: str + """ + if self == self.FILE: + return None + elif self == self.FOLDER: + return 'blue' + elif self == self.IMAGE: + return 'magenta' + elif self == self.ARCHIVE: + return 'red' + elif self == self.MODEL: + return 'green' + elif self == self.DATA: + return 'yellow' + else: + raise ValueError(f'Unknown type - {self!r}') # pragma: no cover
+ + +
[docs]class ListItem: + """ + Class representing a list item. + + :param item: The item object. + :type item: Union[RepoFolder, RepoFile] + :param base_dir: The base directory. + :type base_dir: str + """ + + def __init__(self, item: Union[RepoFolder, RepoFile], base_dir: str): + self.item = item + self.base_dir = base_dir + if isinstance(item, RepoFolder): + self.type = ListItemType.FOLDER + else: + mimetype, _ = mimetypes.guess_type(item.path) + _, ext = os.path.splitext(item.path) + self.type = ListItemType.FILE + if ext in {'.ckpt', '.pt', '.safetensors', '.onnx', '.model', '.h5', '.mlmodel', + '.ftz', '.pb', '.pth', '.tflite'}: + self.type = ListItemType.MODEL + elif ext in {'.json', '.csv', '.tsv', '.arrow', '.bin', '.msgpack', '.npy', '.npz', + '.parquet', '.pickle', '.pkl', '.wasm'}: + self.type = ListItemType.DATA + elif mimetype: + if 'image' in mimetype: + self.type = ListItemType.IMAGE + elif mimetype.split('/', maxsplit=1)[-1] in {'zip', 'rar', 'x-tar', 'x-7z-compressed'}: + self.type = ListItemType.ARCHIVE
+ + +def _add_ls_subcommand(cli: click.Group) -> click.Group: + """ + Add the 'ls' subcommand to the CLI. + + :param cli: The Click CLI application. + :type cli: click.Group + :return: The modified Click CLI application. + :rtype: click.Group + """ + + @cli.command('ls', help='List files from HuggingFace repository.\n\n' + 'Set environment $HF_TOKEN to use your own access token.', + context_settings=CONTEXT_SETTINGS) + @click.option('-r', '--repository', 'repo_id', type=str, required=True, + help='Repository to download from.') + @click.option('-t', '--type', 'repo_type', type=click.Choice(REPO_TYPES), default='dataset', + help='Type of the HuggingFace repository.', show_default=True) + @click.option('-d', '--directory', 'dir_in_repo', type=str, default=None, + help='Directory in repository to download the full directory tree.') + @click.option('-R', '--revision', 'revision', type=str, default='main', + help='Revision of repository.', show_default=True) + @click.option('-a', '--all', 'show_all', is_flag=True, type=bool, default=False, + help='Show all files, including hidden files.', show_default=True) + @click.option('-l', '--list', 'show_detailed', is_flag=True, type=bool, default=False, + help='Show detailed file information.', show_default=True) + def ls(repo_id: str, repo_type: str, dir_in_repo, revision: str, show_all: bool, show_detailed: bool): + """ + List files from a HuggingFace repository. + + :param repo_id: The identifier of the repository. + :type repo_id: str + :param repo_type: The type of the HuggingFace repository. + :type repo_type: str + :param dir_in_repo: The directory in the repository to list files from. + :type dir_in_repo: str + :param revision: The revision of the repository. + :type revision: str + :param show_all: Flag to indicate whether to show all files, including hidden files. + :type show_all: bool + :param show_detailed: Flag to indicate whether to show detailed file information. + :type show_detailed: bool + """ + hf_client = get_hf_client() + items: List[ListItem] = [] + for item in hf_client.list_repo_tree( + repo_id=repo_id, + repo_type=repo_type, + path_in_repo=dir_in_repo, + revision=revision, + recursive=False, + expand=show_detailed, + ): + relpath = os.path.relpath(item.path, dir_in_repo) + if not show_all and relpath.startswith('.'): + continue + + item = ListItem(item, dir_in_repo) + items.append(item) + if not show_detailed: + print(click.style( + os.path.relpath(item.item.path, item.base_dir), + fg=item.type.render_color + )) + + if show_detailed: + max_size_length = 0 + max_commit_info_length = 0 + for item in items: + if item.type == ListItemType.FOLDER: + size_text = '-' + else: + size_text = str(item.item.size) + max_size_length = max(max_size_length, len(size_text)) + + commit_text = (item.item.last_commit.title or '').splitlines(keepends=False)[0] + max_commit_info_length = max(max_commit_info_length, len(commit_text)) + + for item in items: + print('d' if item.type == ListItemType.FOLDER else '-', end='') + print('L' if item.type != ListItemType.FOLDER and item.item.lfs else '-', end='') + + commit_text = (item.item.last_commit.title or '').splitlines(keepends=False)[0] + print( + ' ' + ' ' * (max_commit_info_length - len(commit_text)) + + click.style(commit_text, underline=True), + end='' + ) + + if item.type == ListItemType.FOLDER: + size_text = '-' + else: + size_text = str(item.item.size) + size_text = ' ' * (max_size_length - len(size_text)) + size_text + print(' ' + size_text, end='') + + print(' ' + item.item.last_commit.oid[:8], end='') + commit_time = item.item.last_commit.date.astimezone(tzlocal.get_localzone()) + print(' ' + commit_time.strftime('%Y-%m-%d %H:%M %Z'), end='') + + print(' ' + click.style( + os.path.relpath(item.item.path, item.base_dir), + fg=item.type.render_color + )) + + return cli +
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/entry/ls_repo.html b/dev/entry/_modules/hfutils/entry/ls_repo.html new file mode 100644 index 0000000000..1de77e1064 --- /dev/null +++ b/dev/entry/_modules/hfutils/entry/ls_repo.html @@ -0,0 +1,241 @@ + + + + + + hfutils.entry.ls_repo — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.entry.ls_repo

+import fnmatch
+from typing import Optional
+
+import click
+from huggingface_hub.utils import LocalTokenNotFoundError
+
+from .base import CONTEXT_SETTINGS, ClickErrorException
+from ..operate.base import REPO_TYPES, get_hf_client
+
+
+
[docs]class NoLocalAuthentication(ClickErrorException): + """ + Exception raised when there is no local authentication token. + """ + exit_code = 0x31
+ + +def _add_ls_repo_subcommand(cli: click.Group) -> click.Group: + """ + Add the ls_repo subcommand to the CLI. + + :param cli: The click Group object. + :type cli: click.Group + + :return: The updated click Group object. + :rtype: click.Group + """ + + @cli.command('ls_repo', help='List repositories from HuggingFace.\n\n' + 'Set environment $HF_TOKEN to use your own access token.', + context_settings=CONTEXT_SETTINGS) + @click.option('-a', '--author', 'author', type=str, default=None, + help='Author of the repositories. Search my repositories when not given.') + @click.option('-t', '--type', 'repo_type', type=click.Choice(REPO_TYPES), default='dataset', + help='Type of the HuggingFace repository.', show_default=True) + @click.option('-p', '--pattern', 'pattern', type=str, default='*', + help='Pattern of the repository names.', show_default=True) + def ls(author: Optional[str], repo_type: str, pattern: str): + """ + List repositories from HuggingFace. + + :param author: Author of the repositories. + :type author: Optional[str] + :param repo_type: Type of the HuggingFace repository. + :type repo_type: str + :param pattern: Pattern of the repository names. + :type pattern: str + """ + hf_client = get_hf_client() + if not author: + try: + info = hf_client.whoami() + author = author or info['name'] + except LocalTokenNotFoundError: + raise NoLocalAuthentication( + 'Authentication failed.\n' + 'Make sure you have set the correct Huggingface token.\n' + 'Or if need to use this with guest mode, please explicitly set the `-a` option.' + ) + + if repo_type == 'model': + r = hf_client.list_models(author=author) + elif repo_type == 'dataset': + r = hf_client.list_datasets(author=author) + elif repo_type == 'space': + r = hf_client.list_spaces(author=author) + else: + raise ValueError(f'Unknown repository type - {repo_type!r}.') # pragma: no cover + + for repo_item in r: + if fnmatch.fnmatch(repo_item.id, pattern): + print(repo_item.id) + + return cli +
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/entry/upload.html b/dev/entry/_modules/hfutils/entry/upload.html new file mode 100644 index 0000000000..8f6beb10c0 --- /dev/null +++ b/dev/entry/_modules/hfutils/entry/upload.html @@ -0,0 +1,311 @@ + + + + + + hfutils.entry.upload — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.entry.upload

+import warnings
+from typing import Optional
+
+import click
+
+from .base import CONTEXT_SETTINGS, command_wrap, ClickErrorException
+from ..operate import upload_file_to_file, upload_directory_as_archive, upload_directory_as_directory
+from ..operate.base import REPO_TYPES, RepoTypeTyping, get_hf_client
+
+
+
[docs]class NoRemotePathAssignedWithUpload(ClickErrorException): + """ + Custom exception class for indicating that no remote path in the repository is assigned. + """ + exit_code = 0x21
+ + +def _add_upload_subcommand(cli: click.Group) -> click.Group: + """ + Add the 'upload' subcommand to the CLI. + + :param cli: The Click CLI application. + :type cli: click.Group + :return: The modified Click CLI application. + :rtype: click.Group + """ + + @cli.command('upload', help='Upload data from HuggingFace.\n\n' + 'Set environment $HF_TOKEN to use your own access token.', + context_settings=CONTEXT_SETTINGS) + @click.option('-r', '--repository', 'repo_id', type=str, required=True, + help='Repository to upload to.') + @click.option('-t', '--type', 'repo_type', type=click.Choice(REPO_TYPES), default='dataset', + help='Type of the HuggingFace repository.', show_default=True) + @click.option('-f', '--filename', 'file_in_repo', type=str, default=None, + help='File in repository to upload.') + @click.option('-a', '--archive', 'archive_in_repo', type=str, default=None, + help='Archive file in repository to upload and extract from') + @click.option('-d', '--directory', 'dir_in_repo', type=str, default=None, + help='Directory in repository to upload the full directory tree.') + @click.option('-i', '--input', 'input_path', type=str, required=True, + help='Input path for upload.') + @click.option('-R', '--revision', 'revision', type=str, default='main', + help='Revision of repository.', show_default=True) + @click.option('-c', '--clear', 'clear', is_flag=True, type=bool, default=False, + help='Clear the remote directory before uploading.\n' + 'Only applied when -d is used.', show_default=True) + @click.option('-p', '--private', 'private', is_flag=True, type=bool, default=None, + help='Set private repository when created.', show_default=True) + @click.option('-P', '--public', 'public', is_flag=True, type=bool, default=None, + help='Set public repository when created.', show_default=True) + @command_wrap() + def upload(repo_id: str, repo_type: RepoTypeTyping, + file_in_repo: Optional[str], archive_in_repo: Optional[str], dir_in_repo: Optional[str], + input_path: str, revision: str, clear: bool, private: bool, public: bool): + """ + Upload data to HuggingFace repositories. + + :param repo_id: Repository to upload to. + :type repo_id: str + :param repo_type: Type of the HuggingFace repository. + :type repo_type: RepoTypeTyping + :param file_in_repo: File in repository to upload. + :type file_in_repo: Optional[str] + :param archive_in_repo: Archive file in repository to upload and extract from. + :type archive_in_repo: Optional[str] + :param dir_in_repo: Directory in repository to upload the full directory tree. + :type dir_in_repo: Optional[str] + :param input_path: Input path for upload. + :type input_path: str + :param revision: Revision of repository. + :type revision: str + :param clear: Clear the remote directory before uploading. + Only applied when -d is used. + :type clear: bool + :param private: Set private repository when created. + :type private: bool + :param public: Set public repository when created. + :type public: bool + """ + if not file_in_repo and not archive_in_repo and not dir_in_repo: + raise NoRemotePathAssignedWithUpload('No remote path in repository assigned.\n' + 'One of the -f, -a, or -d option is required.') + + hf_client = get_hf_client() + if private or public: + set_visibility = True + if private and public: + raise ValueError('Repository should have only one accessibility, ' + '-p (--private) and -P (--public) should not be used together.') + + is_private = False + if public: + is_private = False + if private: + is_private = True + else: + set_visibility = False + is_private = False + + if not hf_client.repo_exists(repo_id, repo_type=repo_type): + hf_client.create_repo(repo_id, repo_type=repo_type, exist_ok=True, private=is_private) + if set_visibility: + hf_client.update_repo_visibility(repo_id, repo_type=repo_type, private=is_private) + + if file_in_repo: + if archive_in_repo: + warnings.warn('File in repository assigned, value of -a option will be ignored.') + if dir_in_repo: + warnings.warn('File in repository assigned, value of -d option will be ignored.') + upload_file_to_file( + local_file=input_path, + repo_id=repo_id, + file_in_repo=file_in_repo, + repo_type=repo_type, + revision=revision, + ) + + elif archive_in_repo: + if dir_in_repo: + warnings.warn('Archive in repository assigned, value of -d option will be ignored.') + upload_directory_as_archive( + local_directory=input_path, + repo_id=repo_id, + archive_in_repo=archive_in_repo, + repo_type=repo_type, + revision=revision, + silent=False, + ) + + elif dir_in_repo: + upload_directory_as_directory( + local_directory=input_path, + repo_id=repo_id, + path_in_repo=dir_in_repo, + repo_type=repo_type, + revision=revision, + clear=clear, + ) + + else: + assert False, 'Should not reach this line, it must be a bug!' # pragma: no cover + + return cli +
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/index/fetch.html b/dev/entry/_modules/hfutils/index/fetch.html new file mode 100644 index 0000000000..53f457f96c --- /dev/null +++ b/dev/entry/_modules/hfutils/index/fetch.html @@ -0,0 +1,723 @@ + + + + + + hfutils.index.fetch — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.index.fetch

+import json
+import os.path
+from typing import Optional, Dict, Union
+
+from huggingface_hub.file_download import http_get, hf_hub_url
+from huggingface_hub.utils import build_hf_headers
+
+from .hash import _f_sha256
+from ..operate.base import RepoTypeTyping, get_hf_client
+
+
+
[docs]class ArchiveStandaloneFileIncompleteDownload(Exception): + """ + Exception raised when a standalone file in an archive is incompletely downloaded. + """
+ + +
[docs]class ArchiveStandaloneFileHashNotMatch(Exception): + """ + Exception raised when the hash of a standalone file in an archive does not match. + """
+ + +
[docs]def hf_tar_get_index(repo_id: str, archive_in_repo: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + idx_repo_id: Optional[str] = None, idx_file_in_repo: Optional[str] = None, + idx_repo_type: Optional[RepoTypeTyping] = None, idx_revision: Optional[str] = None, + hf_token: Optional[str] = None): + """ + Get the index of a tar archive file in a Hugging Face repository. + + :param repo_id: The identifier of the repository. + :type repo_id: str + :param archive_in_repo: The path to the archive file in the repository. + :type archive_in_repo: str + :param repo_type: The type of the Hugging Face repository. + :type repo_type: RepoTypeTyping, optional + :param revision: The revision of the repository. + :type revision: str, optional + :param idx_repo_id: The identifier of the index repository. + :type idx_repo_id: str, optional + :param idx_file_in_repo: The path to the index file in the index repository. + :type idx_file_in_repo: str, optional + :param idx_repo_type: The type of the index repository. + :type idx_repo_type: RepoTypeTyping, optional + :param idx_revision: The revision of the index repository. + :type idx_revision: str, optional + :param hf_token: The Hugging Face access token. + :type hf_token: str, optional + :return: The index of the tar archive file. + :rtype: Dict + + Examples:: + >>> from hfutils.index import hf_tar_get_index + >>> + >>> idx = hf_tar_get_index( + ... repo_id='deepghs/danbooru_newest', + ... archive_in_repo='images/0000.tar', + ... ) + >>> idx.keys() + dict_keys(['filesize', 'hash', 'hash_lfs', 'files']) + >>> idx['files'].keys() + dict_keys(['7507000.jpg', '7506000.jpg', '7505000.jpg', ...]) + + .. note:: + + Besides, if the tar and index files are in different repositories, you can also use this function to + get the index information by explicitly assigning the ``idx_repo_id`` argument. + + >>> from hfutils.index import hf_tar_get_index + >>> + >>> idx = hf_tar_get_index( + ... repo_id='nyanko7/danbooru2023', + ... idx_repo_id='deepghs/danbooru2023_index', + ... archive_in_repo='original/data-0000.tar', + ... ) + >>> idx.keys() + dict_keys(['filesize', 'hash', 'hash_lfs', 'files']) + >>> idx['files'].keys() + dict_keys(['./1000.png', './10000.jpg', './100000.jpg', ...]) + + """ + hf_client = get_hf_client(hf_token) + body, _ = os.path.splitext(archive_in_repo) + default_index_file = f'{body}.json' + with open(hf_client.hf_hub_download( + repo_id=idx_repo_id or repo_id, + repo_type=idx_repo_type or repo_type, + filename=idx_file_in_repo or default_index_file, + revision=idx_revision or revision, + ), 'r') as f: + return json.load(f)
+ + +
[docs]def hf_tar_list_files(repo_id: str, archive_in_repo: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + idx_repo_id: Optional[str] = None, idx_file_in_repo: Optional[str] = None, + idx_repo_type: Optional[RepoTypeTyping] = None, idx_revision: Optional[str] = None, + hf_token: Optional[str] = None): + """ + List files inside a tar archive file in a Hugging Face repository. + + :param repo_id: The identifier of the repository. + :type repo_id: str + :param archive_in_repo: The path to the archive file in the repository. + :type archive_in_repo: str + :param repo_type: The type of the Hugging Face repository. + :type repo_type: RepoTypeTyping, optional + :param revision: The revision of the repository. + :type revision: str, optional + :param idx_repo_id: The identifier of the index repository. + :type idx_repo_id: str, optional + :param idx_file_in_repo: The path to the index file in the index repository. + :type idx_file_in_repo: str, optional + :param idx_repo_type: The type of the index repository. + :type idx_repo_type: RepoTypeTyping, optional + :param idx_revision: The revision of the index repository. + :type idx_revision: str, optional + :param hf_token: The Hugging Face access token. + :type hf_token: str, optional + :return: The list of files inside the tar archive. + :rtype: List[str] + + Examples:: + >>> from hfutils.index import hf_tar_list_files + >>> + >>> hf_tar_list_files( + ... repo_id='deepghs/danbooru_newest', + ... archive_in_repo='images/0000.tar', + ... ) + ['7507000.jpg', '7506000.jpg', '7505000.jpg', ...] + + .. note:: + + Besides, if the tar and index files are in different repositories, you can also use this function to + list all the files by explicitly assigning the ``idx_repo_id`` argument. + + >>> from hfutils.index import hf_tar_list_files + >>> + >>> hf_tar_list_files( + ... repo_id='nyanko7/danbooru2023', + ... idx_repo_id='deepghs/danbooru2023_index', + ... archive_in_repo='original/data-0000.tar', + ... ) + ['./1000.png', './10000.jpg', './100000.jpg', ...] + + """ + index_data = hf_tar_get_index( + repo_id=repo_id, + archive_in_repo=archive_in_repo, + repo_type=repo_type, + revision=revision, + + idx_repo_id=idx_repo_id, + idx_file_in_repo=idx_file_in_repo, + idx_repo_type=idx_repo_type, + idx_revision=idx_revision, + + hf_token=hf_token, + ) + + return list(index_data['files'].keys())
+ + +
[docs]def hf_tar_file_exists(repo_id: str, archive_in_repo: str, file_in_archive: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + idx_repo_id: Optional[str] = None, idx_file_in_repo: Optional[str] = None, + idx_repo_type: Optional[RepoTypeTyping] = None, idx_revision: Optional[str] = None, + hf_token: Optional[str] = None): + """ + Check if a file exists inside a tar archive file in a Hugging Face repository. + + :param repo_id: The identifier of the repository. + :type repo_id: str + :param archive_in_repo: The path to the archive file in the repository. + :type archive_in_repo: str + :param file_in_archive: The path to the file inside the archive. + :type file_in_archive: str + :param repo_type: The type of the Hugging Face repository. + :type repo_type: RepoTypeTyping, optional + :param revision: The revision of the repository. + :type revision: str, optional + :param idx_repo_id: The identifier of the index repository. + :type idx_repo_id: str, optional + :param idx_file_in_repo: The path to the index file in the index repository. + :type idx_file_in_repo: str, optional + :param idx_repo_type: The type of the index repository. + :type idx_repo_type: RepoTypeTyping, optional + :param idx_revision: The revision of the index repository. + :type idx_revision: str, optional + :param hf_token: The Hugging Face access token. + :type hf_token: str, optional + :return: True if the file exists, False otherwise. + :rtype: bool + + Examples:: + >>> from hfutils.index import hf_tar_file_exists + >>> + >>> hf_tar_file_exists( + ... repo_id='deepghs/danbooru_newest', + ... archive_in_repo='images/0000.tar', + ... file_in_archive='7506000.jpg', + ... ) + True + >>> hf_tar_file_exists( + ... repo_id='deepghs/danbooru_newest', + ... archive_in_repo='images/0000.tar', + ... file_in_archive='17506000.jpg', + ... ) + False + + .. note:: + + Besides, if the tar and index files are in different repositories, you can also use this function to + check the file existence by explicitly assigning the ``idx_repo_id`` argument. + + >>> from hfutils.index import hf_tar_file_exists + >>> + >>> hf_tar_file_exists( + ... repo_id='nyanko7/danbooru2023', + ... idx_repo_id='deepghs/danbooru2023_index', + ... archive_in_repo='original/data-0000.tar', + ... file_in_archive='1000.png' + ... ) + True + >>> hf_tar_file_exists( + ... repo_id='nyanko7/danbooru2023', + ... idx_repo_id='deepghs/danbooru2023_index', + ... archive_in_repo='original/data-0000.tar', + ... file_in_archive='10000000001000.png' + ... ) + False + + """ + index = hf_tar_get_index( + repo_id=repo_id, + archive_in_repo=archive_in_repo, + repo_type=repo_type, + revision=revision, + + idx_repo_id=idx_repo_id, + idx_file_in_repo=idx_file_in_repo, + idx_repo_type=idx_repo_type, + idx_revision=idx_revision, + + hf_token=hf_token, + ) + files = _hf_files_process(index['files']) + return _n_path(file_in_archive) in files
+ + +def _n_path(path): + """ + Normalize a file path. + + :param path: The file path to normalize. + :type path: str + :return: The normalized file path. + :rtype: str + """ + return os.path.normpath(os.path.join('/', path)) + + +def _hf_files_process(files: Dict[str, dict]): + """ + Normalize file paths in a dictionary of files. + + :param files: The dictionary of files. + :type files: Dict[str, dict] + :return: The dictionary of files with normalized paths. + :rtype: Dict[str, dict] + """ + return {_n_path(key): value for key, value in files.items()} + + +
[docs]def hf_tar_file_info(repo_id: str, archive_in_repo: str, file_in_archive: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + idx_repo_id: Optional[str] = None, idx_file_in_repo: Optional[str] = None, + idx_repo_type: Optional[RepoTypeTyping] = None, idx_revision: Optional[str] = None, + hf_token: Optional[str] = None) -> dict: + """ + Get a file's detailed information in index tars, including offset, sha256 and size. + + :param repo_id: The identifier of the repository. + :type repo_id: str + :param archive_in_repo: The path to the archive file in the repository. + :type archive_in_repo: str + :param file_in_archive: The path to the file inside the archive. + :type file_in_archive: str + :param repo_type: The type of the Hugging Face repository. + :type repo_type: RepoTypeTyping, optional + :param revision: The revision of the repository. + :type revision: str, optional + :param idx_repo_id: The identifier of the index repository. + :type idx_repo_id: str, optional + :param idx_file_in_repo: The path to the index file in the index repository. + :type idx_file_in_repo: str, optional + :param idx_repo_type: The type of the index repository. + :type idx_repo_type: RepoTypeTyping, optional + :param idx_revision: The revision of the index repository. + :type idx_revision: str, optional + :param hf_token: The Hugging Face access token. + :type hf_token: str, optional + :return: Return a dictionary object with meta information of this file. + :rtype: dict + :raises FileNotFoundError: Raise this when file not exist in tar archive. + + Examples:: + >>> from hfutils.index import hf_tar_file_info + >>> + >>> hf_tar_file_info( + ... repo_id='deepghs/danbooru_newest', + ... archive_in_repo='images/0000.tar', + ... file_in_archive='7506000.jpg', + ... ) + {'offset': 265728, 'size': 435671, 'sha256': 'ef6a4e031fdffb705c8ce2c64e8cb8d993f431a887d7c1c0b1e6fa56e6107fcd'} + + .. note:: + + Besides, if the tar and index files are in different repositories, you can also use this function to + get the file information by explicitly assigning the ``idx_repo_id`` argument. + + >>> from hfutils.index import hf_tar_file_info + >>> + >>> hf_tar_file_info( + ... repo_id='nyanko7/danbooru2023', + ... idx_repo_id='deepghs/danbooru2023_index', + ... archive_in_repo='original/data-0000.tar', + ... file_in_archive='1000.png' + ... ) + {'offset': 1024, 'size': 11966, 'sha256': '478d3313860519372f6a75ede287d4a7c18a2d851bbc79b3dd65caff4c716858'} + """ + index = hf_tar_get_index( + repo_id=repo_id, + archive_in_repo=archive_in_repo, + repo_type=repo_type, + revision=revision, + + idx_repo_id=idx_repo_id, + idx_file_in_repo=idx_file_in_repo, + idx_repo_type=idx_repo_type, + idx_revision=idx_revision, + + hf_token=hf_token, + ) + files = _hf_files_process(index['files']) + if _n_path(file_in_archive) not in files: + raise FileNotFoundError(f'File {file_in_archive!r} not found ' + f'in {repo_type}s/{repo_id}@{revision}/{archive_in_repo}.') + else: + return files[_n_path(file_in_archive)]
+ + +
[docs]def hf_tar_file_size(repo_id: str, archive_in_repo: str, file_in_archive: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + idx_repo_id: Optional[str] = None, idx_file_in_repo: Optional[str] = None, + idx_repo_type: Optional[RepoTypeTyping] = None, idx_revision: Optional[str] = None, + hf_token: Optional[str] = None) -> int: + """ + Get a file's size in index tars. + + :param repo_id: The identifier of the repository. + :type repo_id: str + :param archive_in_repo: The path to the archive file in the repository. + :type archive_in_repo: str + :param file_in_archive: The path to the file inside the archive. + :type file_in_archive: str + :param repo_type: The type of the Hugging Face repository. + :type repo_type: RepoTypeTyping, optional + :param revision: The revision of the repository. + :type revision: str, optional + :param idx_repo_id: The identifier of the index repository. + :type idx_repo_id: str, optional + :param idx_file_in_repo: The path to the index file in the index repository. + :type idx_file_in_repo: str, optional + :param idx_repo_type: The type of the index repository. + :type idx_repo_type: RepoTypeTyping, optional + :param idx_revision: The revision of the index repository. + :type idx_revision: str, optional + :param hf_token: The Hugging Face access token. + :type hf_token: str, optional + :return: Return an integer which represents the size of this file. + :rtype: int + :raises FileNotFoundError: Raise this when file not exist in tar archive. + + Examples:: + >>> from hfutils.index import hf_tar_file_size + >>> + >>> hf_tar_file_size( + ... repo_id='deepghs/danbooru_newest', + ... archive_in_repo='images/0000.tar', + ... file_in_archive='7506000.jpg', + ... ) + 435671 + + .. note:: + + Besides, if the tar and index files are in different repositories, you can also use this function to + get the file size by explicitly assigning the ``idx_repo_id`` argument. + + >>> from hfutils.index import hf_tar_file_size + >>> + >>> hf_tar_file_size( + ... repo_id='nyanko7/danbooru2023', + ... idx_repo_id='deepghs/danbooru2023_index', + ... archive_in_repo='original/data-0000.tar', + ... file_in_archive='1000.png' + ... ) + 11966 + """ + return hf_tar_file_info( + repo_id=repo_id, + archive_in_repo=archive_in_repo, + file_in_archive=file_in_archive, + repo_type=repo_type, + revision=revision, + idx_repo_id=idx_repo_id, + idx_file_in_repo=idx_file_in_repo, + idx_repo_type=idx_repo_type, + idx_revision=idx_revision, + hf_token=hf_token + )['size']
+ + +
[docs]def hf_tar_file_download(repo_id: str, archive_in_repo: str, file_in_archive: str, local_file: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + idx_repo_id: Optional[str] = None, idx_file_in_repo: Optional[str] = None, + idx_repo_type: Optional[RepoTypeTyping] = None, idx_revision: Optional[str] = None, + proxies: Optional[Dict] = None, user_agent: Union[Dict, str, None] = None, + headers: Optional[Dict[str, str]] = None, endpoint: Optional[str] = None, + hf_token: Optional[str] = None): + """ + Download a file from a tar archive file in a Hugging Face repository. + + :param repo_id: The identifier of the repository. + :type repo_id: str + :param archive_in_repo: The path to the archive file in the repository. + :type archive_in_repo: str + :param file_in_archive: The path to the file inside the archive. + :type file_in_archive: str + :param local_file: The path to save the downloaded file locally. + :type local_file: str + :param repo_type: The type of the Hugging Face repository. + :type repo_type: RepoTypeTyping, optional + :param revision: The revision of the repository. + :type revision: str, optional + :param idx_repo_id: The identifier of the index repository. + :type idx_repo_id: str, optional + :param idx_file_in_repo: The path to the index file in the index repository. + :type idx_file_in_repo: str, optional + :param idx_repo_type: The type of the index repository. + :type idx_repo_type: RepoTypeTyping, optional + :param idx_revision: The revision of the index repository. + :type idx_revision: str, optional + :param proxies: The proxies to be used for the HTTP request. + :type proxies: Dict, optional + :param user_agent: The user agent for the HTTP request. + :type user_agent: Union[Dict, str, None], optional + :param headers: The additional headers for the HTTP request. + :type headers: Dict[str, str], optional + :param endpoint: The Hugging Face API endpoint. + :type endpoint: str, optional + :param hf_token: The Hugging Face access token. + :type hf_token: str, optional + :raises FileNotFoundError: Raise this when file not exist in tar archive. + :raises ArchiveStandaloneFileIncompleteDownload: Raise when download incomplete. + :raises ArchiveStandaloneFileHashNotMatch: Raise when download hash not match. + + Examples:: + >>> from hfutils.index import hf_tar_file_download + >>> + >>> hf_tar_file_download( + ... repo_id='deepghs/danbooru_newest', + ... archive_in_repo='images/0000.tar', + ... file_in_archive='7506000.jpg', + ... local_file='test_example.jpg' # download destination + ... ) + + .. note:: + + Besides, if the tar and index files are in different repositories, you can also use this function to + download the given file by explicitly assigning the ``idx_repo_id`` argument. + + >>> from hfutils.index import hf_tar_file_download + >>> + >>> hf_tar_file_download( + ... repo_id='nyanko7/danbooru2023', + ... idx_repo_id='deepghs/danbooru2023_index', + ... archive_in_repo='original/data-0000.tar', + ... file_in_archive='1000.png', + ... local_file='test_example.png' # download destination + ... ) + """ + index = hf_tar_get_index( + repo_id=repo_id, + archive_in_repo=archive_in_repo, + repo_type=repo_type, + revision=revision, + + idx_repo_id=idx_repo_id, + idx_file_in_repo=idx_file_in_repo, + idx_repo_type=idx_repo_type, + idx_revision=idx_revision, + + hf_token=hf_token, + ) + files = _hf_files_process(index['files']) + if _n_path(file_in_archive) not in files: + raise FileNotFoundError(f'File {file_in_archive!r} not found ' + f'in {repo_type}s/{repo_id}@{revision}/{archive_in_repo}.') + + info = files[_n_path(file_in_archive)] + + url_to_download = hf_hub_url(repo_id, archive_in_repo, repo_type=repo_type, revision=revision, endpoint=endpoint) + headers = build_hf_headers( + token=hf_token, + library_name=None, + library_version=None, + user_agent=user_agent, + headers=headers, + ) + start_bytes = info['offset'] + end_bytes = info['offset'] + info['size'] - 1 + headers['Range'] = f'bytes={start_bytes}-{end_bytes}' + + if os.path.dirname(local_file): + os.makedirs(os.path.dirname(local_file), exist_ok=True) + try: + with open(local_file, 'wb') as f: + if info['size'] > 0: + http_get( + url_to_download, + f, + proxies=proxies, + resume_size=0, + headers=headers, + expected_size=info['size'], + displayed_filename=file_in_archive, + ) + + if os.path.getsize(local_file) != info['size']: + raise ArchiveStandaloneFileIncompleteDownload( + f'Expected size is {info["size"]}, but actually {os.path.getsize(local_file)} downloaded.' + ) + + if info.get('sha256'): + _sha256 = _f_sha256(local_file) + if _sha256 != info['sha256']: + raise ArchiveStandaloneFileHashNotMatch( + f'Expected hash is {info["sha256"]!r}, but actually {_sha256!r} found.' + ) + + except Exception: + if os.path.exists(local_file): + os.remove(local_file) + raise
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/index/make.html b/dev/entry/_modules/hfutils/index/make.html new file mode 100644 index 0000000000..ef5bf94749 --- /dev/null +++ b/dev/entry/_modules/hfutils/index/make.html @@ -0,0 +1,385 @@ + + + + + + hfutils.index.make — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.index.make

+import json
+import logging
+import os
+import tarfile
+from hashlib import sha256, sha1
+from typing import Optional
+
+from .hash import _f_sha256
+from ..archive import archive_pack
+from ..operate import download_file_to_file, upload_file_to_file, upload_directory_as_directory
+from ..operate.base import RepoTypeTyping
+from ..utils import TemporaryDirectory, tqdm
+
+
+
[docs]def tar_get_index_info(src_tar_file, chunk_for_hash: int = 1 << 20, with_hash: bool = True, silent: bool = False): + """ + Get the index information of a tar archive file. + + .. note:: + The return value of this function will be directly used as the index json file. + + :param src_tar_file: The path to the source tar archive file. + :type src_tar_file: str + :param chunk_for_hash: The chunk size for hashing, defaults to 1 << 20 (1 MB). + :type chunk_for_hash: int, optional + :param with_hash: Whether to include file hashes in the index, defaults to True. + :type with_hash: bool, optional + :param silent: Whether to suppress progress bars and logging messages, defaults to False. + :type silent: bool, optional + :return: The index information of the tar archive file. + :rtype: dict + """ + filesize = os.path.getsize(src_tar_file) + sha_common = sha1() + sha_common.update(f'blob {filesize}\0'.encode('utf-8')) + sha_lfs = sha256() + logging.info(f'Calculating hash of {src_tar_file!r} ...') + with open(src_tar_file, 'rb') as f: + # make sure the big files will not cause OOM + while True: + data = f.read(chunk_for_hash) + if not data: + break + sha_common.update(data) + sha_lfs.update(data) + + logging.info(f'Indexing tar file {src_tar_file!r} ...') + files = {} + with tarfile.open(src_tar_file, mode='r|') as tar: + for tarinfo in tqdm(tar, desc='Indexing tar file ...', silent=silent): + tarinfo: tarfile.TarInfo + if tarinfo.isreg(): + info = { + 'offset': tarinfo.offset_data, + 'size': tarinfo.size, + } + if with_hash: + with TemporaryDirectory() as td: + tar.extract(tarinfo, td) + dst_file = os.path.join(td, tarinfo.name) + info['sha256'] = _f_sha256(dst_file) + + files[tarinfo.name] = info + + return { + 'filesize': filesize, + 'hash': sha_common.hexdigest(), + 'hash_lfs': sha_lfs.hexdigest(), + 'files': files, + }
+ + +
[docs]def tar_create_index(src_tar_file, dst_index_file: Optional[str] = None, + chunk_for_hash: int = 1 << 20, with_hash: bool = True, silent: bool = False): + """ + Create an index file for a tar archive file. + + :param src_tar_file: The path to the source tar archive file. + :type src_tar_file: str + :param dst_index_file: The path to save the index file, defaults to None. + :type dst_index_file: str, optional + :param chunk_for_hash: The chunk size for hashing, defaults to 1 << 20 (1 MB). + :type chunk_for_hash: int, optional + :param with_hash: Whether to include file hashes in the index, defaults to True. + :type with_hash: bool, optional + :param silent: Whether to suppress progress bars and logging messages, defaults to False. + :type silent: bool, optional + :return: The path to the created index file. + :rtype: str + """ + body, _ = os.path.splitext(src_tar_file) + dst_index_file = dst_index_file or f'{body}.json' + with open(dst_index_file, 'w') as f: + json.dump(tar_get_index_info(src_tar_file, chunk_for_hash, with_hash, silent), f) + return dst_index_file
+ + +
[docs]def hf_tar_create_index(repo_id: str, archive_in_repo: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + idx_repo_id: Optional[str] = None, idx_file_in_repo: Optional[str] = None, + idx_repo_type: Optional[RepoTypeTyping] = None, idx_revision: Optional[str] = None, + chunk_for_hash: int = 1 << 20, with_hash: bool = True, skip_when_synced: bool = True, + hf_token: Optional[str] = None, ): + """ + Create an index file for a tar archive file in a Hugging Face repository. + + :param repo_id: The identifier of the repository. + :type repo_id: str + :param archive_in_repo: The path to the tar archive file. + :type archive_in_repo: str + :param repo_type: The type of the Hugging Face repository, defaults to 'dataset'. + :type repo_type: RepoTypeTyping, optional + :param revision: The revision of the repository, defaults to 'main'. + :type revision: str, optional + :param idx_repo_id: The identifier of the index repository, defaults to None. + :type idx_repo_id: str, optional + :param idx_file_in_repo: The path to save the index file in the index repository, defaults to None. + :type idx_file_in_repo: str, optional + :param idx_repo_type: The type of the index repository, defaults to None. + :type idx_repo_type: RepoTypeTyping, optional + :param idx_revision: The revision of the index repository, defaults to None. + :type idx_revision: str, optional + :param chunk_for_hash: The chunk size for hashing, defaults to 1 << 20 (1 MB). + :type chunk_for_hash: int, optional + :param with_hash: Whether to include file hashes in the index, defaults to True. + :type with_hash: bool, optional + :param skip_when_synced: Skip syncing when index is ready, defaults to True. + :type skip_when_synced: bool + :param hf_token: The Hugging Face access token, defaults to None. + :type hf_token: str, optional + """ + body, _ = os.path.splitext(archive_in_repo) + default_index_filename = f'{body}.json' + + from .validate import hf_tar_validate + if skip_when_synced and hf_tar_validate( + repo_id=repo_id, + repo_type=repo_type, + archive_in_repo=archive_in_repo, + revision=revision, + + idx_repo_id=idx_repo_id or repo_id, + idx_repo_type=idx_repo_type or repo_type, + idx_file_in_repo=idx_file_in_repo or default_index_filename, + idx_revision=idx_revision or revision, + + hf_token=hf_token, + ): + logging.info(f'Entry {repo_type}s/{repo_id}/{archive_in_repo} already indexed, skipped.') + return + + with TemporaryDirectory() as td: + local_tar_file = os.path.join(td, os.path.basename(archive_in_repo)) + download_file_to_file( + repo_id=repo_id, + repo_type=repo_type, + file_in_repo=archive_in_repo, + local_file=local_tar_file, + revision=revision, + hf_token=hf_token, + ) + dst_index_file = tar_create_index(local_tar_file, chunk_for_hash=chunk_for_hash, with_hash=with_hash) + + upload_file_to_file( + repo_id=idx_repo_id or repo_id, + repo_type=idx_repo_type or repo_type, + file_in_repo=idx_file_in_repo or default_index_filename, + local_file=dst_index_file, + revision=idx_revision or revision, + hf_token=hf_token, + message=f'Create index for {repo_type}s/{repo_id}@{revision}/{archive_in_repo}', + )
+ + +
[docs]def hf_tar_create_from_directory( + repo_id: str, archive_in_repo: str, local_directory: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + chunk_for_hash: int = 1 << 20, with_hash: bool = True, + silent: bool = False, hf_token: Optional[str] = None): + """ + Create a tar archive file from a local directory and upload it to a Hugging Face repository. + + :param repo_id: The identifier of the repository. + :type repo_id: str + :param archive_in_repo: The path to save the tar archive file in the repository. + :type archive_in_repo: str + :param local_directory: The path to the local directory to be archived. + :type local_directory: str + :param repo_type: The type of the Hugging Face repository, defaults to 'dataset'. + :type repo_type: RepoTypeTyping, optional + :param revision: The revision of the repository, defaults to 'main'. + :type revision: str, optional + :param chunk_for_hash: The chunk size for hashing, defaults to 1 << 20 (1 MB). + :type chunk_for_hash: int, optional + :param with_hash: Whether to include file hashes in the index, defaults to True. + :type with_hash: bool, optional + :param silent: Whether to suppress progress bars and logging messages, defaults to False. + :type silent: bool, optional + :param hf_token: The Hugging Face access token, defaults to None. + :type hf_token: str, optional + """ + _, ext = os.path.splitext(archive_in_repo) + with TemporaryDirectory() as td: + local_tar_file = os.path.join(td, archive_in_repo) + if os.path.dirname(local_tar_file): + os.makedirs(os.path.dirname(local_tar_file), exist_ok=True) + archive_pack('tar', local_directory, local_tar_file, silent=silent) + tar_create_index(local_tar_file, chunk_for_hash=chunk_for_hash, with_hash=with_hash, silent=silent) + + upload_directory_as_directory( + repo_id=repo_id, + repo_type=repo_type, + path_in_repo='.', + local_directory=td, + revision=revision, + hf_token=hf_token, + message=f'Create indexed tar {repo_type}s/{repo_id}@{revision}/{archive_in_repo}' + )
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/index/validate.html b/dev/entry/_modules/hfutils/index/validate.html new file mode 100644 index 0000000000..8fcbc34b99 --- /dev/null +++ b/dev/entry/_modules/hfutils/index/validate.html @@ -0,0 +1,288 @@ + + + + + + hfutils.index.validate — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.index.validate

+from typing import Optional
+
+from huggingface_hub.hf_api import RepoFile
+from huggingface_hub.utils import EntryNotFoundError, RepositoryNotFoundError
+
+from .fetch import hf_tar_get_index
+from ..operate.base import RepoTypeTyping, get_hf_client
+
+
+
[docs]def hf_tar_item_validate(file_item: RepoFile, size: int, hash_: Optional[str] = None, hash_lfs: Optional[str] = None): + """ + Validate a file item in a tar archive. + + This function checks if the file item matches the expected size and hash. + + :param file_item: The file item from the Hugging Face repository. + :type file_item: RepoFile + :param size: The expected size of the file. + :type size: int + :param hash_: The expected SHA-1 hash of the file. + :type hash_: str, optional + :param hash_lfs: The expected SHA-256 hash of the file if stored in LFS. + :type hash_lfs: str, optional + :return: True if the file item is valid, False otherwise. + :rtype: bool + """ + # size not match + if (file_item.lfs and size != file_item.lfs.size) or \ + (not file_item.lfs and size != file_item.size): + return False + + # compare tar file hash + item_hashes = [file_item.blob_id] + if file_item.lfs: + item_hashes.append(file_item.lfs.sha256) + item_hashes = set(filter(bool, item_hashes)) + cmp_hashes = [hash_, hash_lfs] + cmp_hashes = set(filter(bool, cmp_hashes)) + return bool(cmp_hashes & item_hashes)
+ + +
[docs]def hf_tar_validate(repo_id: str, archive_in_repo: str, repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + idx_repo_id: Optional[str] = None, idx_file_in_repo: Optional[str] = None, + idx_repo_type: Optional[RepoTypeTyping] = None, idx_revision: Optional[str] = None, + hf_token: Optional[str] = None): + """ + Validate a tar archive in a Hugging Face repository. + + This function validates if the tar archive in the Hugging Face repository matches the expected size and hash. + + .. note:: + This function is based on Huggingface API and hash information in index files, no tar file will be downloaded. + + :param repo_id: The ID of the Hugging Face repository. + :type repo_id: str + :param archive_in_repo: The path to the tar archive in the repository. + :type archive_in_repo: str + :param repo_type: The type of the Hugging Face repository, defaults to 'dataset'. + :type repo_type: RepoTypeTyping, optional + :param revision: The revision of the repository, defaults to 'main'. + :type revision: str, optional + :param idx_repo_id: The ID of the repository where the index file is stored. + :type idx_repo_id: Optional[str], optional + :param idx_file_in_repo: The path to the index file in the repository. + :type idx_file_in_repo: Optional[str], optional + :param idx_repo_type: The type of the repository where the index file is stored. + :type idx_repo_type: Optional[RepoTypeTyping], optional + :param idx_revision: The revision of the repository where the index file is stored. + :type idx_revision: Optional[str], optional + :param hf_token: The Hugging Face token for authentication, defaults to None. + :type hf_token: Optional[str], optional + :raises EntryNotFoundError: If the specified entry is not found in the repository. + :raises IsADirectoryError: If the specified entry is a directory. + :return: True if the tar archive is valid, False otherwise. + :rtype: bool + + .. note:: + + If this function returns `False`, it means the json index is expired and need to be re-generated. + + So this function and :func:`hfutils.index.make.hf_tar_create_index` can be used together to gracefully + refresh an indexed tar dataset. + """ + hf_client = get_hf_client(hf_token) + + items = list(hf_client.get_paths_info( + repo_id=repo_id, + repo_type=repo_type, + paths=[archive_in_repo], + revision=revision, + )) + if len(items) == 0: + raise EntryNotFoundError(f'Entry {repo_type}s/{repo_id}/{archive_in_repo} not found.') + elif not isinstance(items[0], RepoFile): + raise IsADirectoryError(f'Entry {repo_type}s/{repo_id}/{archive_in_repo} is a directory, not a file.') + else: + item = items[0] + + try: + index = hf_tar_get_index( + repo_id=repo_id, + archive_in_repo=archive_in_repo, + repo_type=repo_type, + revision=revision, + + idx_repo_id=idx_repo_id, + idx_file_in_repo=idx_file_in_repo, + idx_repo_type=idx_repo_type, + idx_revision=idx_revision, + + hf_token=hf_token, + ) + except (EntryNotFoundError, RepositoryNotFoundError): + return False + + return hf_tar_item_validate( + file_item=item, + size=index['filesize'], + hash_=index.get('hash'), + hash_lfs=index.get('hash_lfs'), + )
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/operate/base.html b/dev/entry/_modules/hfutils/operate/base.html new file mode 100644 index 0000000000..47fad3b0df --- /dev/null +++ b/dev/entry/_modules/hfutils/operate/base.html @@ -0,0 +1,302 @@ + + + + + + hfutils.operate.base — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.operate.base

+import fnmatch
+import os
+from functools import lru_cache
+from typing import Literal, List, Optional
+
+from huggingface_hub import HfApi, HfFileSystem
+
+from hfutils.utils import parse_hf_fs_path
+
+RepoTypeTyping = Literal['dataset', 'model', 'space']
+REPO_TYPES = ['dataset', 'model', 'space']
+
+
+@lru_cache()
+def _get_hf_token() -> Optional[str]:
+    """
+    Retrieve the Hugging Face token from the environment variable.
+
+    :return: The Hugging Face token.
+    :rtype: Optional[str]
+    """
+    return os.environ.get('HF_TOKEN')
+
+
+
[docs]@lru_cache() +def get_hf_client(hf_token: Optional[str] = None) -> HfApi: + """ + Get the Hugging Face API client. + + :param hf_token: Huggingface token for API client, use ``HF_TOKEN`` variable if not assigned. + :type hf_token: str, optional + + :return: The Hugging Face API client. + :rtype: HfApi + """ + return HfApi(token=hf_token or _get_hf_token())
+ + +
[docs]@lru_cache() +def get_hf_fs(hf_token: Optional[str] = None) -> HfFileSystem: + """ + Get the Hugging Face file system. + + :param hf_token: Huggingface token for API client, use ``HF_TOKEN`` variable if not assigned. + :type hf_token: str, optional + + :return: The Hugging Face file system. + :rtype: HfFileSystem + """ + # use_listings_cache=False is necessary + # or the result of glob and ls will be cached, the unittest will down + return HfFileSystem(token=hf_token or _get_hf_token(), use_listings_cache=False)
+ + +_DEFAULT_IGNORE_PATTERNS = ['.git*'] +_IGNORE_PATTERN_UNSET = object() + + +def _is_file_ignored(file_segments: List[str], ignore_patterns: List[str]) -> bool: + """ + Check if a file should be ignored based on the given ignore patterns. + + :param file_segments: The segments of the file path. + :type file_segments: List[str] + :param ignore_patterns: List of file patterns to ignore. + :type ignore_patterns: List[str] + + :return: True if the file should be ignored, False otherwise. + :rtype: bool + """ + for segment in file_segments: + for pattern in ignore_patterns: + if fnmatch.fnmatch(segment, pattern): + return True + + return False + + +
[docs]def list_files_in_repository(repo_id: str, repo_type: RepoTypeTyping = 'dataset', + subdir: str = '', revision: str = 'main', + ignore_patterns: List[str] = _IGNORE_PATTERN_UNSET, + hf_token: Optional[str] = None) -> List[str]: + """ + List files in a Hugging Face repository based on the given parameters. + + :param repo_id: The identifier of the repository. + :type repo_id: str + :param repo_type: The type of the repository ('dataset', 'model', 'space'). + :type repo_type: RepoTypeTyping + :param subdir: The subdirectory to list files from. + :type subdir: str + :param revision: The revision of the repository (e.g., branch, tag, commit hash). + :type revision: str + :param ignore_patterns: List of file patterns to ignore. + :type ignore_patterns: List[str] + :param hf_token: Huggingface token for API client, use ``HF_TOKEN`` variable if not assigned. + :type hf_token: str, optional + + :return: A list of file paths. + :rtype: List[str] + """ + if ignore_patterns is _IGNORE_PATTERN_UNSET: + ignore_patterns = _DEFAULT_IGNORE_PATTERNS + hf_fs = get_hf_fs(hf_token) + if repo_type == 'model': + repo_root_path = repo_id + elif repo_type == 'dataset': + repo_root_path = f'datasets/{repo_id}' + elif repo_type == 'space': + repo_root_path = f'spaces/{repo_id}' + else: + raise ValueError(f'Invalid repo_type - {repo_type!r}.') + if subdir and subdir != '.': + repo_root_path = f'{repo_root_path}/{subdir}' + + try: + _exist_files = [ + parse_hf_fs_path(file).filename + for file in hf_fs.glob(f'{repo_root_path}/**', revision=revision) + ] + except FileNotFoundError: + return [] + if subdir and subdir != '.': + _exist_files = [os.path.relpath(file, subdir) for file in _exist_files] + + _exist_ps = sorted([(file, file.split('/')) for file in _exist_files], key=lambda x: x[1]) + retval = [] + for i, (file, segments) in enumerate(_exist_ps): + if i < len(_exist_ps) - 1 and segments == _exist_ps[i + 1][1][:len(segments)]: + continue + if file != '.': + if not _is_file_ignored(segments, ignore_patterns): + retval.append('/'.join(segments)) + + return retval
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/operate/download.html b/dev/entry/_modules/hfutils/operate/download.html new file mode 100644 index 0000000000..a8fa1c058c --- /dev/null +++ b/dev/entry/_modules/hfutils/operate/download.html @@ -0,0 +1,328 @@ + + + + + + hfutils.operate.download — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.operate.download

+import logging
+import os.path
+import shutil
+from concurrent.futures import ThreadPoolExecutor
+from typing import List, Optional
+
+import requests.exceptions
+
+from .base import RepoTypeTyping, list_files_in_repository, _IGNORE_PATTERN_UNSET, get_hf_client
+from .validate import is_local_file_ready
+from ..archive import archive_unpack
+from ..utils import tqdm, TemporaryDirectory, hf_normpath
+
+
+
[docs]def download_file_to_file(local_file: str, repo_id: str, file_in_repo: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + resume_download: bool = True, hf_token: Optional[str] = None): + """ + Download a file from a Hugging Face repository and save it to a local file. + + :param local_file: The local file path to save the downloaded file. + :type local_file: str + :param repo_id: The identifier of the repository. + :type repo_id: str + :param file_in_repo: The file path within the repository. + :type file_in_repo: str + :param repo_type: The type of the repository ('dataset', 'model', 'space'). + :type repo_type: RepoTypeTyping + :param revision: The revision of the repository (e.g., branch, tag, commit hash). + :type revision: str + :param resume_download: Resume the existing download. + :type resume_download: bool + :param hf_token: Huggingface token for API client, use ``HF_TOKEN`` variable if not assigned. + :type hf_token: str, optional + """ + hf_client = get_hf_client(hf_token) + relative_filename = os.path.join(*file_in_repo.split("/")) + with TemporaryDirectory() as td: + temp_path = os.path.join(td, relative_filename) + try: + hf_client.hf_hub_download( + repo_id=repo_id, + repo_type=repo_type, + filename=hf_normpath(file_in_repo), + revision=revision, + local_dir=td, + resume_download=resume_download, + ) + finally: + if os.path.exists(temp_path): + if os.path.dirname(local_file): + os.makedirs(os.path.dirname(local_file), exist_ok=True) + shutil.move(temp_path, local_file)
+ + +
[docs]def download_archive_as_directory(local_directory: str, repo_id: str, file_in_repo: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + password: Optional[str] = None, hf_token: Optional[str] = None): + """ + Download an archive file from a Hugging Face repository and extract it to a local directory. + + :param local_directory: The local directory path to extract the downloaded archive. + :type local_directory: str + :param repo_id: The identifier of the repository. + :type repo_id: str + :param file_in_repo: The file path within the repository. + :type file_in_repo: str + :param repo_type: The type of the repository ('dataset', 'model', 'space'). + :type repo_type: RepoTypeTyping + :param revision: The revision of the repository (e.g., branch, tag, commit hash). + :type revision: str + :param password: The password of the archive file. + :type password: str, optional + :param hf_token: Huggingface token for API client, use ``HF_TOKEN`` variable if not assigned. + :type hf_token: str, optional + """ + with TemporaryDirectory() as td: + archive_file = os.path.join(td, os.path.basename(file_in_repo)) + download_file_to_file(archive_file, repo_id, file_in_repo, repo_type, revision, hf_token=hf_token) + archive_unpack(archive_file, local_directory, password=password)
+ + +
[docs]def download_directory_as_directory(local_directory: str, repo_id: str, dir_in_repo: str = '.', + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + silent: bool = False, ignore_patterns: List[str] = _IGNORE_PATTERN_UNSET, + resume_download: bool = True, max_workers: int = 8, max_retries: int = 5, + hf_token: Optional[str] = None): + """ + Download all files in a directory from a Hugging Face repository to a local directory. + + :param local_directory: The local directory path to save the downloaded files. + :type local_directory: str + :param repo_id: The identifier of the repository. + :type repo_id: str + :param dir_in_repo: The directory path within the repository. + :type dir_in_repo: str + :param repo_type: The type of the repository ('dataset', 'model', 'space'). + :type repo_type: RepoTypeTyping + :param revision: The revision of the repository (e.g., branch, tag, commit hash). + :type revision: str + :param silent: If True, suppress progress bar output. + :type silent: bool + :param ignore_patterns: List of file patterns to ignore. + :type ignore_patterns: List[str] + :param max_workers: Max workers when downloading. Default is ``8``. + :type max_workers: int + :param max_retries: Max retry times when downloading. Default is ``5``. + :type max_retries: int + :param resume_download: Resume the existing download. + :type resume_download: bool + :param hf_token: Huggingface token for API client, use ``HF_TOKEN`` variable if not assigned. + :type hf_token: str, optional + """ + files = list_files_in_repository(repo_id, repo_type, dir_in_repo, revision, ignore_patterns, hf_token=hf_token) + progress = tqdm(files, silent=silent, desc=f'Downloading {dir_in_repo!r} ...') + + def _download_one_file(rel_file): + current_resume_download = resume_download + try: + dst_file = os.path.join(local_directory, rel_file) + file_in_repo = hf_normpath(f'{dir_in_repo}/{rel_file}') + if os.path.exists(dst_file) and is_local_file_ready( + repo_id=repo_id, + repo_type=repo_type, + local_file=dst_file, + file_in_repo=file_in_repo, + revision=revision, + hf_token=hf_token, + ): + logging.info(f'Local file {rel_file} is ready, download skipped.') + else: + tries = 0 + while True: + try: + download_file_to_file( + local_file=dst_file, + repo_id=repo_id, + file_in_repo=file_in_repo, + repo_type=repo_type, + revision=revision, + resume_download=current_resume_download, + hf_token=hf_token, + ) + except requests.exceptions.RequestException as err: + if tries < max_retries: + tries += 1 + logging.warning(f'Download {rel_file!r} failed, retry ({tries}/{max_retries}) - {err!r}.') + current_resume_download = True + else: + raise + else: + break + + progress.update() + except Exception as err: + logging.error(f'Unexpected error when downloading {rel_file!r} - {err!r}') + + tp = ThreadPoolExecutor(max_workers=max_workers) + for file in files: + tp.submit(_download_one_file, file) + tp.shutdown(wait=True)
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/operate/upload.html b/dev/entry/_modules/hfutils/operate/upload.html new file mode 100644 index 0000000000..62b6dc2e64 --- /dev/null +++ b/dev/entry/_modules/hfutils/operate/upload.html @@ -0,0 +1,384 @@ + + + + + + hfutils.operate.upload — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.operate.upload

+import datetime
+import logging
+import math
+import os.path
+import re
+import time
+from typing import Optional, List
+
+from hbutils.string import plural_word
+from huggingface_hub import CommitOperationAdd, CommitOperationDelete
+
+from .base import RepoTypeTyping, get_hf_client, list_files_in_repository, _IGNORE_PATTERN_UNSET
+from ..archive import get_archive_type, archive_pack
+from ..utils import walk_files, TemporaryDirectory, tqdm
+
+
+
[docs]def upload_file_to_file(local_file, repo_id: str, file_in_repo: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + message: Optional[str] = None, hf_token: Optional[str] = None): + """ + Upload a local file to a specified path in a Hugging Face repository. + + :param local_file: The local file path to be uploaded. + :type local_file: str + :param repo_id: The identifier of the repository. + :type repo_id: str + :param file_in_repo: The file path within the repository. + :type file_in_repo: str + :param repo_type: The type of the repository ('dataset', 'model', 'space'). + :type repo_type: RepoTypeTyping + :param revision: The revision of the repository (e.g., branch, tag, commit hash). + :type revision: str + :param message: The commit message for the upload. + :type message: Optional[str] + :param hf_token: Huggingface token for API client, use ``HF_TOKEN`` variable if not assigned. + :type hf_token: str, optional + """ + hf_client = get_hf_client(hf_token) + hf_client.upload_file( + repo_id=repo_id, + repo_type=repo_type, + path_or_fileobj=local_file, + path_in_repo=file_in_repo, + revision=revision, + commit_message=message, + )
+ + +
[docs]def upload_directory_as_archive(local_directory, repo_id: str, archive_in_repo: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + message: Optional[str] = None, silent: bool = False, + hf_token: Optional[str] = None): + """ + Upload a local directory as an archive file to a specified path in a Hugging Face repository. + + :param local_directory: The local directory path to be uploaded. + :type local_directory: str + :param repo_id: The identifier of the repository. + :type repo_id: str + :param archive_in_repo: The archive file path within the repository. + :type archive_in_repo: str + :param repo_type: The type of the repository ('dataset', 'model', 'space'). + :type repo_type: RepoTypeTyping + :param revision: The revision of the repository (e.g., branch, tag, commit hash). + :type revision: str + :param message: The commit message for the upload. + :type message: Optional[str] + :param silent: If True, suppress progress bar output. + :type silent: bool + :param hf_token: Huggingface token for API client, use ``HF_TOKEN`` variable if not assigned. + :type hf_token: str, optional + """ + archive_type = get_archive_type(archive_in_repo) + with TemporaryDirectory() as td: + local_archive_file = os.path.join(td, os.path.basename(archive_in_repo)) + archive_pack(archive_type, local_directory, local_archive_file, silent=silent) + upload_file_to_file(local_archive_file, repo_id, archive_in_repo, + repo_type, revision, message, hf_token=hf_token)
+ + +_PATH_SEP = re.compile(r'[/\\]+') + + +
[docs]def upload_directory_as_directory( + local_directory, repo_id: str, path_in_repo: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + message: Optional[str] = None, time_suffix: bool = True, + clear: bool = False, ignore_patterns: List[str] = _IGNORE_PATTERN_UNSET, + hf_token: Optional[str] = None, operation_chunk_size: Optional[int] = None, + upload_timespan: float = 5.0, +): + """ + Upload a local directory and its files to a specified path in a Hugging Face repository. + + :param local_directory: The local directory path to be uploaded. + :type local_directory: str + :param repo_id: The identifier of the repository. + :type repo_id: str + :param path_in_repo: The directory path within the repository. + :type path_in_repo: str + :param repo_type: The type of the repository ('dataset', 'model', 'space'). + :type repo_type: RepoTypeTyping + :param revision: The revision of the repository (e.g., branch, tag, commit hash). + :type revision: str + :param message: The commit message for the upload. + :type message: Optional[str] + :param time_suffix: If True, append a timestamp to the commit message. + :type time_suffix: bool + :param clear: If True, remove files in the repository not present in the local directory. + :type clear: bool + :param ignore_patterns: List of file patterns to ignore. + :type ignore_patterns: List[str] + :param hf_token: Huggingface token for API client, use ``HF_TOKEN`` variable if not assigned. + :type hf_token: str, optional + :param operation_chunk_size: Chunk size of the operations. All the operations will be + seperated into multiple commits when this is set. + :type operation_chunk_size: Optional[int] + :param upload_timespan: Upload minimal time interval when chunked uploading enabled. + :type upload_timespan: float + + .. note:: + When `operation_chunk_size` is set, multiple commits will be created. When some commits failed, + it will roll back to the startup commit, using :func:`hfutils.repository.hf_hub_rollback` function.. + + .. warning:: + When `operation_chunk_size` is set, multiple commits will be created. But HuggingFace's repository + api cannot guarantee the atomic feature of your data. So **this function is not thread-safe**. + + .. note:: + The rate limit of HuggingFace repository commit creation is approximately 120 commits / hour. + So if you really have large number of chunks to create, please set the `upload_timespan` to a value + no less than `30.0` to make sure your uploading will not be rate-limited. + """ + hf_client = get_hf_client(hf_token) + if clear: + pre_exist_files = { + tuple(file.split('/')) for file in + list_files_in_repository(repo_id, repo_type, path_in_repo, revision, ignore_patterns, hf_token=hf_token) + } + else: + pre_exist_files = set() + + operations = [] + for file in walk_files(local_directory): + segments = tuple(seg for seg in _PATH_SEP.split(file) if seg) + if segments in pre_exist_files: + pre_exist_files.remove(segments) + operations.append(CommitOperationAdd( + path_or_fileobj=os.path.join(local_directory, file), + path_in_repo=f'{path_in_repo}/{"/".join(segments)}', + )) + + for segments in sorted(pre_exist_files): + operations.append(CommitOperationDelete( + path_in_repo=f'{path_in_repo}/{"/".join(segments)}', + )) + + current_time = datetime.datetime.now().astimezone().strftime('%Y-%m-%d %H:%M:%S %Z') + commit_message = message or f'Upload directory {os.path.basename(os.path.abspath(local_directory))!r}' + if time_suffix: + commit_message = f'{commit_message}, on {current_time}' + + if operation_chunk_size: + initial_commit_id = hf_client.list_repo_commits( + repo_id=repo_id, + repo_type=repo_type, + revision=revision + )[0].commit_id + + last_upload_at = None + try: + total_chunks = int(math.ceil(len(operations) / operation_chunk_size)) + for chunk_id in tqdm(range(total_chunks), desc='Chunked Commits'): + operation_chunk = operations[chunk_id * operation_chunk_size:(chunk_id + 1) * operation_chunk_size] + + # sleep for the given time + if last_upload_at: + sleep_time = last_upload_at + upload_timespan - time.time() + if sleep_time > 0: + logging.info(f'Sleep for {sleep_time:.1f}s due to the timespan limitation ...') + time.sleep(sleep_time) + + last_upload_at = time.time() + logging.info(f'Uploading chunk #{chunk_id + 1}, ' + f'with {plural_word(len(operation_chunk), "operation")} ...') + hf_client.create_commit( + repo_id=repo_id, + repo_type=repo_type, + revision=revision, + operations=operation_chunk, + commit_message=f'[Chunk #{chunk_id + 1}/{total_chunks}] {commit_message}', + ) + + + except Exception: + from ..repository import hf_hub_rollback + + logging.error(f'Error found when executing chunked uploading, ' + f'revision {revision!r} will rollback to {initial_commit_id!r} ...') + hf_hub_rollback( + repo_id=repo_id, + repo_type=repo_type, + revision=revision, + rollback_to=initial_commit_id, + hf_token=hf_token, + ) + + raise + + else: + hf_client.create_commit( + repo_id=repo_id, + repo_type=repo_type, + revision=revision, + operations=operations, + commit_message=commit_message, + )
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/operate/validate.html b/dev/entry/_modules/hfutils/operate/validate.html new file mode 100644 index 0000000000..1b96a80574 --- /dev/null +++ b/dev/entry/_modules/hfutils/operate/validate.html @@ -0,0 +1,255 @@ + + + + + + hfutils.operate.validate — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.operate.validate

+import logging
+import os
+from hashlib import sha256, sha1
+from typing import Optional
+
+from huggingface_hub.hf_api import RepoFile
+from huggingface_hub.utils import EntryNotFoundError
+
+from .base import RepoTypeTyping, get_hf_client
+
+
+def _raw_check_local_file(repo_file: RepoFile, local_file: str, chunk_for_hash: int = 1 << 20) -> bool:
+    """
+    Checks if the local file matches the file on the Hugging Face Hub repository.
+
+    :param repo_file: The information of the file on the Hugging Face Hub repository.
+    :type repo_file: RepoFile
+    :param local_file: The path to the local file.
+    :type local_file: str
+    :param chunk_for_hash: The chunk size for calculating the hash. Default is 1 << 20.
+    :type chunk_for_hash: int
+    :return: True if the local file matches the file on the repository, False otherwise.
+    :rtype: bool
+    """
+    filesize = os.path.getsize(local_file)
+    if repo_file.size != filesize:
+        logging.debug(f'File {local_file!r} size ({filesize}) does not match '
+                      f'the remote file {repo_file.path!r} ({repo_file.size}).')
+        return False
+
+    if repo_file.lfs:
+        sha = sha256()
+        expected_hash = repo_file.lfs.sha256
+    else:
+        sha = sha1()
+        sha.update(f'blob {filesize}\0'.encode('utf-8'))
+        expected_hash = repo_file.blob_id
+
+    with open(local_file, 'rb') as f:
+        # Make sure the big files will not cause out-of-memory errors
+        while True:
+            data = f.read(chunk_for_hash)
+            if not data:
+                break
+            sha.update(data)
+
+    actual_hash = sha.hexdigest()
+    is_match = actual_hash == expected_hash
+    logging.debug(f'Result hash of {local_file!r} ({actual_hash}) '
+                  f'{"matches" if is_match else "does not match"} '
+                  f'the hash of the remote file {repo_file.path!r} ({expected_hash}).')
+    return is_match
+
+
+
[docs]def is_local_file_ready(local_file: str, repo_id: str, file_in_repo: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + hf_token: Optional[str] = None) -> bool: + """ + Checks if the local file is ready by comparing it with the file on the Hugging Face Hub repository. + + :param local_file: The path to the local file. + :type local_file: str + :param repo_id: The identifier of the repository. + :type repo_id: str + :param file_in_repo: The path to the file in the repository. + :type file_in_repo: str + :param repo_type: The type of the repository. Default is 'dataset'. + :type repo_type: RepoTypeTyping + :param revision: The revision of the repository. Default is 'main'. + :type revision: str + :param hf_token: The Hugging Face API token. Default is None. + :type hf_token: Optional[str] + :return: True if the local file matches the file on the repository, False otherwise. + :rtype: bool + """ + hf_client = get_hf_client(hf_token) + infos = hf_client.get_paths_info( + repo_id=repo_id, + repo_type=repo_type, + revision=revision, + paths=[file_in_repo], + ) + if len(infos) == 0: + raise EntryNotFoundError(f'Entry {repo_type}s/{repo_id}/{file_in_repo} not found.') + elif len(infos) == 1: + return _raw_check_local_file(infos[0], local_file) + else: + assert False, f'Should not reach here, multiple files with the same name found - {infos!r}' # pragma: no cover
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/repository/base.html b/dev/entry/_modules/hfutils/repository/base.html new file mode 100644 index 0000000000..aae47f44ac --- /dev/null +++ b/dev/entry/_modules/hfutils/repository/base.html @@ -0,0 +1,248 @@ + + + + + + hfutils.repository.base — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.repository.base

+"""
+This module provides utility functions for working with Hugging Face Hub repositories and Git.
+
+It includes functions to:
+
+1. Generate Hugging Face Hub repository URLs.
+2. Check Git and Git LFS installations.
+
+The module uses the `git_info` function from the `hbutils.system` package and constants from `huggingface_hub`.
+"""
+
+from typing import Optional
+
+from hbutils.system import git_info
+from huggingface_hub.constants import ENDPOINT
+
+from ..utils.path import RepoTypeTyping
+
+
+
[docs]def hf_hub_repo_url(repo_id: str, repo_type: RepoTypeTyping = 'dataset', endpoint: Optional[str] = None) -> str: + """ + Generate a Hugging Face Hub repository URL. + + :param repo_id: The repository ID. + :type repo_id: str + :param repo_type: The type of repository. Can be 'model', 'dataset', or 'space'. Defaults to 'dataset'. + :type repo_type: RepoTypeTyping + :param endpoint: The Hugging Face Hub endpoint. If None, uses the default ENDPOINT. + :type endpoint: Optional[str] + + :return: The full URL for the specified Hugging Face Hub repository. + :rtype: str + + :raises ValueError: If an unknown repository type is provided. + + :usage: + >>> hf_hub_repo_url('username/repo', 'model') + 'https://huggingface.co/username/repo' + >>> hf_hub_repo_url('username/dataset', 'dataset') + 'https://huggingface.co/datasets/username/dataset' + """ + endpoint = endpoint or ENDPOINT + if repo_type == 'model': + return f'{endpoint}/{repo_id}' + elif repo_type == 'dataset': + return f'{endpoint}/datasets/{repo_id}' + elif repo_type == 'space': + return f'{endpoint}/spaces/{repo_id}' + else: + raise ValueError(f'Unknown repository type - {repo_type!r}.')
+ + +def _check_git(requires_lfs: bool = True) -> str: + """ + Check Git and Git LFS installations. + + This function checks if Git is installed and, optionally, if Git LFS is installed. + The results are cached for improved performance. + + :param requires_lfs: Whether to check for Git LFS installation. Defaults to True. + :type requires_lfs: bool + + :return: The path to the Git executable. + :rtype: str + + :raises EnvironmentError: If Git is not installed or if Git LFS is required but not installed. + + :usage: + >>> _check_git() + '/usr/bin/git' + >>> _check_git(requires_lfs=False) + '/usr/bin/git' + """ + info = git_info() + if not info['installed']: + raise EnvironmentError('Git not installed.') + else: + if requires_lfs and not info['lfs']['installed']: + raise EnvironmentError('Git lfs not installed.') + else: + return info['exec'] +
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/repository/clone.html b/dev/entry/_modules/hfutils/repository/clone.html new file mode 100644 index 0000000000..86f2ad85fc --- /dev/null +++ b/dev/entry/_modules/hfutils/repository/clone.html @@ -0,0 +1,254 @@ + + + + + + hfutils.repository.clone — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.repository.clone

+"""
+This module provides functionality to clone Hugging Face Hub repositories using Git.
+
+It includes a function to clone a repository from Hugging Face Hub to a local directory,
+with options for authentication, repository type, revision, and other Git clone parameters.
+"""
+
+import copy
+import logging
+import os
+import subprocess
+import sys
+from typing import Optional
+
+from huggingface_hub.errors import LocalTokenNotFoundError
+from urlobject import URLObject
+
+from .base import hf_hub_repo_url, _check_git
+from ..operate import get_hf_client
+from ..utils.path import RepoTypeTyping
+
+
+
[docs]def hf_hub_clone(repo_id: str, dst_dir: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + endpoint: Optional[str] = None, hf_token: Optional[str] = None, + silent: bool = False, no_lfs: bool = False, max_depth: Optional[int] = None): + """ + Clone a repository from Hugging Face Hub. + + :param repo_id: The ID of the repository to clone. + :type repo_id: str + :param dst_dir: The local directory to clone the repository into. + :type dst_dir: str + :param repo_type: The type of the repository ('dataset', 'model', or 'space'). Defaults to 'dataset'. + :type repo_type: RepoTypeTyping + :param revision: The specific revision to clone. Defaults to 'main'. + :type revision: str + :param endpoint: The Hugging Face Hub endpoint. If None, uses the default endpoint. + :type endpoint: Optional[str] + :param hf_token: The Hugging Face authentication token. If None, attempts to use stored credentials. + :type hf_token: Optional[str] + :param silent: If True, suppresses command output. Defaults to False. + :type silent: bool + :param no_lfs: If True, skips downloading of LFS files. Defaults to False. + :type no_lfs: bool + :param max_depth: The maximum number of commits to fetch. If None, fetches all commits. + :type max_depth: Optional[int] + + :raises subprocess.CalledProcessError: If the Git clone command fails. + + :usage: + >>> hf_hub_clone('username/repo', '/path/to/local/dir', repo_type='model', revision='v1.0') + """ + _git = _check_git(requires_lfs=not no_lfs) + hf_client = get_hf_client(hf_token) + try: + username = hf_client.whoami()['name'] + except LocalTokenNotFoundError: + username = None # anonymous mode + + clone_url = URLObject(hf_hub_repo_url( + repo_id=repo_id, + repo_type=repo_type, + endpoint=endpoint, + )) + if username: + clone_url = clone_url.with_username(username).with_password(hf_client.token) + clone_url = str(clone_url) + + command = [_git, 'clone', '-b', revision] + if max_depth is not None: + command.extend(['--depth', str(max_depth)]) + command.extend([clone_url, dst_dir]) + logging.info(f'Cloning repository with command {command!r} ...') + with open(os.devnull, 'w') as nf: + envs = copy.deepcopy(os.environ) + if no_lfs: + envs['GIT_LFS_SKIP_SMUDGE'] = '1' + envs['GIT_TERMINAL_PROMPT'] = '0' + process = subprocess.run( + args=command, + stdout=nf if silent else sys.stdout, + stderr=nf if silent else sys.stderr, + env=envs, + bufsize=0 if not silent else -1, + ) + process.check_returncode()
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/repository/rollback.html b/dev/entry/_modules/hfutils/repository/rollback.html new file mode 100644 index 0000000000..8fe728d20a --- /dev/null +++ b/dev/entry/_modules/hfutils/repository/rollback.html @@ -0,0 +1,269 @@ + + + + + + hfutils.repository.rollback — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.repository.rollback

+"""
+This module provides functionality to rollback a Hugging Face Hub repository to a specific commit.
+
+It includes a function to clone a repository, reset it to a specified commit, and force push the changes back to the remote repository.
+"""
+
+import logging
+import os.path
+import subprocess
+import sys
+from typing import Optional
+
+from .base import _check_git
+from .clone import hf_hub_clone
+from ..utils import TemporaryDirectory
+from ..utils.path import RepoTypeTyping
+
+
+
[docs]def hf_hub_rollback(repo_id: str, rollback_to: str, + repo_type: RepoTypeTyping = 'dataset', revision: str = 'main', + endpoint: Optional[str] = None, hf_token: Optional[str] = None, silent: bool = False): + """ + Rollback a Hugging Face Hub repository to a specific commit. + + This function clones the repository, resets it to the specified commit, and force pushes the changes back to the remote. + + :param repo_id: The ID of the repository to rollback. + :type repo_id: str + :param rollback_to: The commit hash or reference to rollback to. + :type rollback_to: str + :param repo_type: The type of the repository ('dataset', 'model', or 'space'). Defaults to 'dataset'. + :type repo_type: RepoTypeTyping + :param revision: The branch or tag to clone. Defaults to 'main'. + :type revision: str + :param endpoint: The Hugging Face Hub endpoint. If None, uses the default endpoint. + :type endpoint: Optional[str] + :param hf_token: The Hugging Face authentication token. If None, attempts to use stored credentials. + :type hf_token: Optional[str] + :param silent: If True, suppresses command output. Defaults to False. + :type silent: bool + + :raises subprocess.CalledProcessError: If any Git command fails during the process. + + :usage: + >>> hf_hub_rollback('username/repo', 'abc123', repo_type='model') + + .. note:: + + This function performs the following steps: + + 1. Checks for Git installation (without LFS requirement). + 2. Creates a temporary directory for the operation. + 3. Clones the specified repository into the temporary directory. + 4. Resets the repository to the specified commit using 'git reset --hard'. + 5. Force pushes the changes back to the remote repository. + + .. warning:: + This operation can overwrite remote history and can not be cancelled. Use with caution. + """ + _git = _check_git(requires_lfs=False) + with TemporaryDirectory() as td, open(os.devnull, 'w') as nf: + envs = { + **os.environ, + 'GIT_LFS_SKIP_SMUDGE': '1', + 'GIT_TERMINAL_PROMPT': '0', + } + + repo_dir = os.path.join(td, 'repo') + hf_hub_clone( + repo_id=repo_id, + dst_dir=repo_dir, + repo_type=repo_type, + revision=revision, + endpoint=endpoint, + hf_token=hf_token, + silent=silent, + no_lfs=True, + ) + + reset_command = [_git, 'reset', '--hard', rollback_to] + logging.info(f'Git resetting with command {reset_command!r} ...') + process = subprocess.run( + args=reset_command, + stdout=nf if silent else sys.stdout, + stderr=nf if silent else sys.stderr, + env=envs, + bufsize=0 if not silent else -1, + cwd=repo_dir, + ) + process.check_returncode() + + push_command = [_git, 'push', '-f'] + logging.info(f'Git pushing with command {push_command!r} ...') + process = subprocess.run( + args=push_command, + stdout=nf if silent else sys.stdout, + stderr=nf if silent else sys.stderr, + env=envs, + bufsize=0 if not silent else -1, + cwd=repo_dir, + ) + process.check_returncode()
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/utils/binary.html b/dev/entry/_modules/hfutils/utils/binary.html new file mode 100644 index 0000000000..8a90afb3cd --- /dev/null +++ b/dev/entry/_modules/hfutils/utils/binary.html @@ -0,0 +1,187 @@ + + + + + + hfutils.utils.binary — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.utils.binary

+# Inspired from https://stackoverflow.com/a/7392391/6995899
+_TEXT_CHARS = bytearray({7, 8, 9, 10, 12, 13, 27} | set(range(0x20, 0x100)) - {0x7f})
+
+
+
[docs]def is_binary_file(file) -> bool: + """ + Check if a given file is binary. + + This function reads the first 1024 bytes of the file and checks if it contains any + non-text (binary) characters. + + :param file: The path to the file to be checked. + :type file: str + + :return: True if the file is binary, False if it is a text file. + :rtype: bool + """ + with open(file, 'rb') as f: + prefix = f.read(1024) + return bool(prefix.translate(None, _TEXT_CHARS))
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/utils/download.html b/dev/entry/_modules/hfutils/utils/download.html new file mode 100644 index 0000000000..16a4332514 --- /dev/null +++ b/dev/entry/_modules/hfutils/utils/download.html @@ -0,0 +1,224 @@ + + + + + + hfutils.utils.download — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.utils.download

+import os
+from typing import Optional
+
+import requests
+
+from .tqdm_ import tqdm
+
+
+
[docs]def download_file(url: str, filename: str, expected_size: Optional[int] = None, desc: Optional[str] = None, + session: Optional[requests.Session] = None, silent: bool = False, **kwargs) -> str: + """ + Download a file from the given URL and save it to the specified filename. + + This function uses the requests library to download a file from the given URL + and provides a progress bar using tqdm. It also performs checks to ensure that + the downloaded file has the expected size. + + :param url: The URL of the file to download. + :type url: str + :param filename: The local path where the file should be saved. + :type filename: str + :param expected_size: The expected size of the file in bytes (optional). + :type expected_size: int, optional + :param desc: Description for the tqdm progress bar (optional). + :type desc: str, optional + :param session: An optional requests.Session object to use for the download. + :type session: requests.Session, optional + :param silent: If True, suppress tqdm output, otherwise display it. + :type silent: bool + :param kwargs: Additional keyword arguments to pass to requests.get(). + + :return: The path to the downloaded file. + :rtype: str + """ + session = session or requests.session() + response = session.get(url, stream=True, allow_redirects=True, **kwargs) + expected_size = expected_size or response.headers.get('Content-Length', None) + expected_size = int(expected_size) if expected_size is not None else expected_size + + desc = desc or os.path.basename(filename) + directory = os.path.dirname(filename) + if directory: + os.makedirs(directory, exist_ok=True) + + with open(filename, 'wb') as f: + with tqdm(total=expected_size, unit='B', unit_scale=True, unit_divisor=1024, desc=desc, silent=silent) as pbar: + for chunk in response.iter_content(chunk_size=1024): + f.write(chunk) + pbar.update(len(chunk)) + + actual_size = os.path.getsize(filename) + if expected_size is not None and actual_size != expected_size: + os.remove(filename) + raise requests.exceptions.HTTPError(f"Downloaded file is not of expected size, " + f"{expected_size} expected but {actual_size} found.") + + return filename
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/utils/path.html b/dev/entry/_modules/hfutils/utils/path.html new file mode 100644 index 0000000000..df43688d0c --- /dev/null +++ b/dev/entry/_modules/hfutils/utils/path.html @@ -0,0 +1,311 @@ + + + + + + hfutils.utils.path — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.utils.path

+import json
+import os
+import re
+from dataclasses import dataclass
+from functools import lru_cache
+from typing import Optional, Dict, Set, Literal
+
+RepoTypeTyping = Literal['dataset', 'model', 'space']
+
+
+
[docs]def hf_normpath(path) -> str: + """ + Normalize a given path. + + :param path: The path to normalize. + :type path: Any + + :return: The normalized path. + :rtype: str + """ + return re.sub( + r'[\\/]+', '/', + os.path.relpath(os.path.normpath(os.path.join(os.sep, path)), os.sep) + )
+ + +
[docs]def hf_fs_path(repo_id: str, filename: str, + repo_type: RepoTypeTyping = 'dataset', revision: Optional[str] = None): + """ + Get the huggingface filesystem path. + + :param repo_id: The repository ID. + :type repo_id: str + + :param filename: The filename. + :type filename: str + + :param repo_type: The type of repository. (default: 'dataset') + :type repo_type: RepoTypeTyping + + :param revision: The revision of the repository. (default: None) + :type revision: Optional[str] + + :return: The huggingface filesystem path. + :rtype: str + """ + filename = hf_normpath(filename) + if repo_type == 'dataset': + prefix = 'datasets/' + elif repo_type == 'space': + prefix = 'spaces/' + else: + prefix = '' + + if revision is not None: + revision_text = f'@{revision}' + else: + revision_text = '' + + return f'{prefix}{repo_id}{revision_text}/{filename}'
+ + +@lru_cache() +def _irregular_repos() -> Dict[RepoTypeTyping, Set[str]]: + """ + Get irregular repositories. + + :return: A dictionary containing irregular repositories. + :rtype: Dict[RepoTypeTyping, Set[str]] + """ + with open(os.path.join(os.path.dirname(__file__), 'irregular_repo.json'), 'r') as f: + data = json.load(f) + return { + 'model': set(data['models']), + 'dataset': set(data['datasets']), + 'space': set(data['spaces']), + } + + +_RE_IR_PATH = re.compile( + r'^(?P<repo_id>[^@/]+)(@(?P<revision>[^@/]+))?(/(?P<filename>[\s\S]+))?$') +_RE_PATH = re.compile( + r'^(?P<repo_id>[^@/]+/[^@/]+)(@(?P<revision>[^@/]+))?(/(?P<filename>[\s\S]+))?$') + + +
[docs]@dataclass +class HfFileSystemPath: + """ + Huggingface FileSystem Path. + + :param repo_id: The repository ID. + :type repo_id: str + + :param filename: The filename. + :type filename: str + + :param repo_type: The type of repository. + :type repo_type: RepoTypeTyping + + :param revision: The revision of the repository. + :type revision: Optional[str] + """ + repo_id: str + filename: str + repo_type: RepoTypeTyping + revision: Optional[str]
+ + +
[docs]def parse_hf_fs_path(path: str) -> HfFileSystemPath: + """ + Parse the huggingface filesystem path. + + :param path: The path to parse. + :type path: str + + :return: The parsed huggingface filesystem path. + :rtype: HfFileSystemPath + :raises ValueError: If this path is invalid. + """ + origin_path = path + repo_type: RepoTypeTyping + if path.startswith('datasets/'): + repo_type = 'dataset' + path = path[len('datasets/'):] + elif path.startswith('spaces/'): + repo_type = 'space' + path = path[len('spaces/'):] + else: + repo_type = 'model' + + matching = _RE_IR_PATH.fullmatch(path) + if matching: + if matching.group('repo_id') not in _irregular_repos()[repo_type]: + matching = None + if not matching: + matching = _RE_PATH.fullmatch(path) + + if matching: + repo_id = matching.group('repo_id') + revision = matching.group('revision') or None + filename = hf_normpath(matching.group('filename') or '.') + return HfFileSystemPath(repo_id, filename, repo_type, revision) + else: + raise ValueError(f'Invalid huggingface filesystem path - {origin_path!r}.')
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/utils/tqdm_.html b/dev/entry/_modules/hfutils/utils/tqdm_.html new file mode 100644 index 0000000000..6d725602b8 --- /dev/null +++ b/dev/entry/_modules/hfutils/utils/tqdm_.html @@ -0,0 +1,192 @@ + + + + + + hfutils.utils.tqdm_ — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.utils.tqdm_

+import io
+
+from tqdm.auto import tqdm as _origin_tqdm
+
+__all__ = ['tqdm']
+
+
+
[docs]def tqdm(*args, silent: bool = False, **kwargs): + """ + An enhanced version of tqdm (progress bar) with an option to silence the output. + + This function modifies the behavior of tqdm to allow silencing the progress bar. + + :param args: Positional arguments to be passed to tqdm. + :param silent: If True, the progress bar content will not be displayed. + :type silent: bool + :param kwargs: Additional keyword arguments to be passed to tqdm. + :return: tqdm progress bar. + :rtype: tqdm.std.tqdm + """ + with io.StringIO() as sio: + if silent: + kwargs['file'] = sio + + return _origin_tqdm(*args, **kwargs)
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/hfutils/utils/walk.html b/dev/entry/_modules/hfutils/utils/walk.html new file mode 100644 index 0000000000..26a8e3a3cd --- /dev/null +++ b/dev/entry/_modules/hfutils/utils/walk.html @@ -0,0 +1,185 @@ + + + + + + hfutils.utils.walk — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +

Source code for hfutils.utils.walk

+import os
+from typing import Iterator
+
+
+
[docs]def walk_files(directory: str) -> Iterator[str]: + """ + Recursively walk through a directory and yield relative paths of all files. + + :param directory: The root directory to start walking. + :type directory: str + + :return: An iterator that yields relative paths of all files in the directory. + :rtype: Iterator[str] + """ + for root, dirs, files in os.walk(directory): + for file in files: + path = os.path.abspath(os.path.join(root, file)) + yield os.path.relpath(path, start=directory)
+
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_modules/index.html b/dev/entry/_modules/index.html new file mode 100644 index 0000000000..82c0efe7ef --- /dev/null +++ b/dev/entry/_modules/index.html @@ -0,0 +1,189 @@ + + + + + + Overview: module code — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/_sources/api_doc/archive/index.rst.txt b/dev/entry/_sources/api_doc/archive/index.rst.txt new file mode 100644 index 0000000000..e0e5503ddf --- /dev/null +++ b/dev/entry/_sources/api_doc/archive/index.rst.txt @@ -0,0 +1,43 @@ +hfutils.archive +===================== + +.. currentmodule:: hfutils.archive + +.. automodule:: hfutils.archive + + +register_archive_type +---------------------------------------- + +.. autofunction:: register_archive_type + + + +archive_pack +---------------------------------------- + +.. autofunction:: archive_pack + + + +archive_unpack +---------------------------------------- + +.. autofunction:: archive_unpack + + + +get_archive_type +---------------------------------------- + +.. autofunction:: get_archive_type + + + +get_archive_extname +---------------------------------------- + +.. autofunction:: get_archive_extname + + + diff --git a/dev/entry/_sources/api_doc/cache/delete.rst.txt b/dev/entry/_sources/api_doc/cache/delete.rst.txt new file mode 100644 index 0000000000..183c6a97b7 --- /dev/null +++ b/dev/entry/_sources/api_doc/cache/delete.rst.txt @@ -0,0 +1,21 @@ +hfutils.cache.delete +================================ + +.. currentmodule:: hfutils.cache.delete + +.. automodule:: hfutils.cache.delete + + +delete_detached_cache +--------------------------------------- + +.. autofunction:: delete_detached_cache + + +delete_cache +--------------------------------------- + +.. autofunction:: delete_cache + + + diff --git a/dev/entry/_sources/api_doc/cache/index.rst.txt b/dev/entry/_sources/api_doc/cache/index.rst.txt new file mode 100644 index 0000000000..dbf03aba10 --- /dev/null +++ b/dev/entry/_sources/api_doc/cache/index.rst.txt @@ -0,0 +1,13 @@ +hfutils.cache +================================ + +.. currentmodule:: hfutils.cache + +.. automodule:: hfutils.cache + + +.. toctree:: + :maxdepth: 3 + + delete + diff --git a/dev/entry/_sources/api_doc/config/index.rst.txt b/dev/entry/_sources/api_doc/config/index.rst.txt new file mode 100644 index 0000000000..f39ee4f2b8 --- /dev/null +++ b/dev/entry/_sources/api_doc/config/index.rst.txt @@ -0,0 +1,12 @@ +hfutils.config +===================== + +.. currentmodule:: hfutils.config + +.. automodule:: hfutils.config + + +.. toctree:: + :maxdepth: 3 + + meta diff --git a/dev/entry/_sources/api_doc/config/meta.rst.txt b/dev/entry/_sources/api_doc/config/meta.rst.txt new file mode 100644 index 0000000000..11411b9403 --- /dev/null +++ b/dev/entry/_sources/api_doc/config/meta.rst.txt @@ -0,0 +1,43 @@ +hfutils.config.meta +========================== + +.. currentmodule:: hfutils.config.meta + +.. automodule:: hfutils.config.meta + + +\_\_TITLE\_\_ +-------------------------------- + +.. autodata:: __TITLE__ + :annotation: + + +\_\_VERSION\_\_ +-------------------------------- + +.. autodata:: __VERSION__ + :annotation: + + +\_\_DESCRIPTION\_\_ +-------------------------------- + +.. autodata:: __DESCRIPTION__ + :annotation: + + +\_\_AUTHOR\_\_ +-------------------------------- + +.. autodata:: __AUTHOR__ + :annotation: + + +\_\_AUTHOR_EMAIL\_\_ +-------------------------------- + +.. autodata:: __AUTHOR_EMAIL__ + :annotation: + + diff --git a/dev/entry/_sources/api_doc/entry/base.rst.txt b/dev/entry/_sources/api_doc/entry/base.rst.txt new file mode 100644 index 0000000000..b888a1d7e4 --- /dev/null +++ b/dev/entry/_sources/api_doc/entry/base.rst.txt @@ -0,0 +1,53 @@ +hfutils.entry.base +================================ + +.. currentmodule:: hfutils.entry.base + +.. automodule:: hfutils.entry.base + + +CONTEXT_SETTINGS +-------------------------- + +.. autodata:: CONTEXT_SETTINGS + + + +ClickWarningException +-------------------------------- + +.. autoclass:: ClickWarningException + :members: exit_code, show + + + +ClickErrorException +------------------------------------ + +.. autoclass:: ClickErrorException + :members: exit_code, show + + + +print_exception +---------------------------------- + +.. autofunction:: print_exception + + + +KeyboardInterrupted +------------------------------------ + +.. autoclass:: KeyboardInterrupted + :members: __init__, exit_code, show + + + +command_wrap +------------------------------- + +.. autofunction:: command_wrap + + + diff --git a/dev/entry/_sources/api_doc/entry/cli.rst.txt b/dev/entry/_sources/api_doc/entry/cli.rst.txt new file mode 100644 index 0000000000..474e114379 --- /dev/null +++ b/dev/entry/_sources/api_doc/entry/cli.rst.txt @@ -0,0 +1,14 @@ +hfutils.entry.cli +================================ + +.. currentmodule:: hfutils.entry.cli + +.. automodule:: hfutils.entry.cli + + +cli +---------------------- + +.. autodata:: cli + + diff --git a/dev/entry/_sources/api_doc/entry/clone.rst.txt b/dev/entry/_sources/api_doc/entry/clone.rst.txt new file mode 100644 index 0000000000..27f49ed010 --- /dev/null +++ b/dev/entry/_sources/api_doc/entry/clone.rst.txt @@ -0,0 +1,9 @@ +hfutils.entry.clone +================================ + +.. currentmodule:: hfutils.entry.clone + +.. automodule:: hfutils.entry.clone + + + diff --git a/dev/entry/_sources/api_doc/entry/dispatch.rst.txt b/dev/entry/_sources/api_doc/entry/dispatch.rst.txt new file mode 100644 index 0000000000..91e0bccd79 --- /dev/null +++ b/dev/entry/_sources/api_doc/entry/dispatch.rst.txt @@ -0,0 +1,22 @@ +hfutils.entry.dispatch +================================ + +.. currentmodule:: hfutils.entry.dispatch + +.. automodule:: hfutils.entry.dispatch + + +print_version +---------------------------------------- + +.. autofunction:: print_version + + + +hfutilcli +---------------------------------------- + +.. autofunction:: hfutilcli + + + diff --git a/dev/entry/_sources/api_doc/entry/download.rst.txt b/dev/entry/_sources/api_doc/entry/download.rst.txt new file mode 100644 index 0000000000..112ece5e9b --- /dev/null +++ b/dev/entry/_sources/api_doc/entry/download.rst.txt @@ -0,0 +1,15 @@ +hfutils.entry.download +================================ + +.. currentmodule:: hfutils.entry.download + +.. automodule:: hfutils.entry.download + + +NoRemotePathAssignedWithDownload +-------------------------------------------- + +.. autoclass:: NoRemotePathAssignedWithDownload + :members: exit_code, show + + diff --git a/dev/entry/_sources/api_doc/entry/index.rst.txt b/dev/entry/_sources/api_doc/entry/index.rst.txt new file mode 100644 index 0000000000..b1bef7074f --- /dev/null +++ b/dev/entry/_sources/api_doc/entry/index.rst.txt @@ -0,0 +1,22 @@ +hfutils.entry +================================ + +.. currentmodule:: hfutils.entry + +.. automodule:: hfutils.entry + + +.. toctree:: + :maxdepth: 3 + + base + cli + clone + dispatch + download + index_ + ls + ls_repo + upload + whoami + rollback diff --git a/dev/entry/_sources/api_doc/entry/index_.rst.txt b/dev/entry/_sources/api_doc/entry/index_.rst.txt new file mode 100644 index 0000000000..d8916e13dc --- /dev/null +++ b/dev/entry/_sources/api_doc/entry/index_.rst.txt @@ -0,0 +1,9 @@ +hfutils.entry.index +================================ + +.. currentmodule:: hfutils.entry.index + +.. automodule:: hfutils.entry.index + + + diff --git a/dev/entry/_sources/api_doc/entry/ls.rst.txt b/dev/entry/_sources/api_doc/entry/ls.rst.txt new file mode 100644 index 0000000000..c57f0e0c33 --- /dev/null +++ b/dev/entry/_sources/api_doc/entry/ls.rst.txt @@ -0,0 +1,21 @@ +hfutils.entry.ls +================================ + +.. currentmodule:: hfutils.entry.ls + +.. automodule:: hfutils.entry.ls + + +ListItemType +------------------------- + +.. autoenum:: ListItemType + + + +ListItem +---------------------------------- + +.. autoclass:: ListItem + + diff --git a/dev/entry/_sources/api_doc/entry/ls_repo.rst.txt b/dev/entry/_sources/api_doc/entry/ls_repo.rst.txt new file mode 100644 index 0000000000..d8cf5e702d --- /dev/null +++ b/dev/entry/_sources/api_doc/entry/ls_repo.rst.txt @@ -0,0 +1,14 @@ +hfutils.entry.ls_repo +================================ + +.. currentmodule:: hfutils.entry.ls_repo + +.. automodule:: hfutils.entry.ls_repo + + +NoLocalAuthentication +---------------------------------- + +.. autoclass:: NoLocalAuthentication + + diff --git a/dev/entry/_sources/api_doc/entry/rollback.rst.txt b/dev/entry/_sources/api_doc/entry/rollback.rst.txt new file mode 100644 index 0000000000..de382d49fe --- /dev/null +++ b/dev/entry/_sources/api_doc/entry/rollback.rst.txt @@ -0,0 +1,9 @@ +hfutils.entry.rollback +================================ + +.. currentmodule:: hfutils.entry.rollback + +.. automodule:: hfutils.entry.rollback + + + diff --git a/dev/entry/_sources/api_doc/entry/upload.rst.txt b/dev/entry/_sources/api_doc/entry/upload.rst.txt new file mode 100644 index 0000000000..ab50a5f3ff --- /dev/null +++ b/dev/entry/_sources/api_doc/entry/upload.rst.txt @@ -0,0 +1,15 @@ +hfutils.entry.upload +================================ + +.. currentmodule:: hfutils.entry.upload + +.. automodule:: hfutils.entry.upload + + +NoRemotePathAssignedWithUpload +-------------------------------------- + +.. autoclass:: NoRemotePathAssignedWithUpload + :members: exit_code, show + + diff --git a/dev/entry/_sources/api_doc/entry/whoami.rst.txt b/dev/entry/_sources/api_doc/entry/whoami.rst.txt new file mode 100644 index 0000000000..934eaa47b9 --- /dev/null +++ b/dev/entry/_sources/api_doc/entry/whoami.rst.txt @@ -0,0 +1,9 @@ +hfutils.entry.whoami +================================ + +.. currentmodule:: hfutils.entry.whoami + +.. automodule:: hfutils.entry.whoami + + + diff --git a/dev/entry/_sources/api_doc/index/fetch.rst.txt b/dev/entry/_sources/api_doc/index/fetch.rst.txt new file mode 100644 index 0000000000..f17dc084e6 --- /dev/null +++ b/dev/entry/_sources/api_doc/index/fetch.rst.txt @@ -0,0 +1,63 @@ +hfutils.index.fetch +================================ + +.. currentmodule:: hfutils.index.fetch + +.. automodule:: hfutils.index.fetch + + +ArchiveStandaloneFileIncompleteDownload +---------------------------------------------- + +.. autoclass:: ArchiveStandaloneFileIncompleteDownload + + + +ArchiveStandaloneFileHashNotMatch +---------------------------------------------- + +.. autoclass:: ArchiveStandaloneFileHashNotMatch + + +hf_tar_get_index +---------------------------------------------- + +.. autofunction:: hf_tar_get_index + + + +hf_tar_list_files +---------------------------------------------- + +.. autofunction:: hf_tar_list_files + + + +hf_tar_file_exists +---------------------------------------------- + +.. autofunction:: hf_tar_file_exists + + + +hf_tar_file_size +---------------------------------------------- + +.. autofunction:: hf_tar_file_size + + + +hf_tar_file_info +---------------------------------------------- + +.. autofunction:: hf_tar_file_info + + + +hf_tar_file_download +---------------------------------------------- + +.. autofunction:: hf_tar_file_download + + + diff --git a/dev/entry/_sources/api_doc/index/index.rst.txt b/dev/entry/_sources/api_doc/index/index.rst.txt new file mode 100644 index 0000000000..b1fb93080b --- /dev/null +++ b/dev/entry/_sources/api_doc/index/index.rst.txt @@ -0,0 +1,15 @@ +hfutils.index +================================ + +.. currentmodule:: hfutils.index + +.. automodule:: hfutils.index + + +.. toctree:: + :maxdepth: 3 + + fetch + make + validate + diff --git a/dev/entry/_sources/api_doc/index/make.rst.txt b/dev/entry/_sources/api_doc/index/make.rst.txt new file mode 100644 index 0000000000..e9888d4fb6 --- /dev/null +++ b/dev/entry/_sources/api_doc/index/make.rst.txt @@ -0,0 +1,36 @@ +hfutils.index.make +================================ + +.. currentmodule:: hfutils.index.make + +.. automodule:: hfutils.index.make + + +tar_create_index +---------------------------------------------- + +.. autofunction:: tar_create_index + + + +hf_tar_create_index +---------------------------------------------- + +.. autofunction:: hf_tar_create_index + + + +tar_get_index_info +---------------------------------------------- + +.. autofunction:: tar_get_index_info + + + +hf_tar_create_from_directory +---------------------------------------------- + +.. autofunction:: hf_tar_create_from_directory + + + diff --git a/dev/entry/_sources/api_doc/index/validate.rst.txt b/dev/entry/_sources/api_doc/index/validate.rst.txt new file mode 100644 index 0000000000..fdac3cd959 --- /dev/null +++ b/dev/entry/_sources/api_doc/index/validate.rst.txt @@ -0,0 +1,22 @@ +hfutils.index.validate +================================ + +.. currentmodule:: hfutils.index.validate + +.. automodule:: hfutils.index.validate + + +hf_tar_item_validate +-------------------------------------- + +.. autofunction:: hf_tar_item_validate + + + +hf_tar_validate +-------------------------------------- + +.. autofunction:: hf_tar_validate + + + diff --git a/dev/entry/_sources/api_doc/operate/base.rst.txt b/dev/entry/_sources/api_doc/operate/base.rst.txt new file mode 100644 index 0000000000..e1a69a3463 --- /dev/null +++ b/dev/entry/_sources/api_doc/operate/base.rst.txt @@ -0,0 +1,29 @@ +hfutils.operate.base +=================================== + +.. currentmodule:: hfutils.operate.base + +.. automodule:: hfutils.operate.base + + +get_hf_client +---------------------------------------- + +.. autofunction:: get_hf_client + + + +get_hf_fs +---------------------------------------- + +.. autofunction:: get_hf_fs + + + +list_files_in_repository +---------------------------------------- + +.. autofunction:: list_files_in_repository + + + diff --git a/dev/entry/_sources/api_doc/operate/download.rst.txt b/dev/entry/_sources/api_doc/operate/download.rst.txt new file mode 100644 index 0000000000..28133e5939 --- /dev/null +++ b/dev/entry/_sources/api_doc/operate/download.rst.txt @@ -0,0 +1,30 @@ +hfutils.operate.download +=================================== + +.. currentmodule:: hfutils.operate.download + +.. automodule:: hfutils.operate.download + + + +download_file_to_file +---------------------------------------- + +.. autofunction:: download_file_to_file + + + +download_archive_as_directory +---------------------------------------- + +.. autofunction:: download_archive_as_directory + + + +download_directory_as_directory +---------------------------------------- + +.. autofunction:: download_directory_as_directory + + + diff --git a/dev/entry/_sources/api_doc/operate/index.rst.txt b/dev/entry/_sources/api_doc/operate/index.rst.txt new file mode 100644 index 0000000000..ef469b178c --- /dev/null +++ b/dev/entry/_sources/api_doc/operate/index.rst.txt @@ -0,0 +1,16 @@ +hfutils.operate +===================== + +.. currentmodule:: hfutils.operate + +.. automodule:: hfutils.operate + + +.. toctree:: + :maxdepth: 3 + + base + download + upload + validate + diff --git a/dev/entry/_sources/api_doc/operate/upload.rst.txt b/dev/entry/_sources/api_doc/operate/upload.rst.txt new file mode 100644 index 0000000000..7a62a2147c --- /dev/null +++ b/dev/entry/_sources/api_doc/operate/upload.rst.txt @@ -0,0 +1,30 @@ +hfutils.operate.upload +=================================== + +.. currentmodule:: hfutils.operate.upload + +.. automodule:: hfutils.operate.upload + + + +upload_file_to_file +---------------------------------------- + +.. autofunction:: upload_file_to_file + + + +upload_directory_as_archive +---------------------------------------- + +.. autofunction:: upload_directory_as_archive + + + +upload_directory_as_directory +---------------------------------------- + +.. autofunction:: upload_directory_as_directory + + + diff --git a/dev/entry/_sources/api_doc/operate/validate.rst.txt b/dev/entry/_sources/api_doc/operate/validate.rst.txt new file mode 100644 index 0000000000..84a16b2dd9 --- /dev/null +++ b/dev/entry/_sources/api_doc/operate/validate.rst.txt @@ -0,0 +1,15 @@ +hfutils.operate.validate +=================================== + +.. currentmodule:: hfutils.operate.validate + +.. automodule:: hfutils.operate.validate + + + +is_local_file_ready +--------------------------------- + +.. autofunction:: is_local_file_ready + + diff --git a/dev/entry/_sources/api_doc/repository/base.rst.txt b/dev/entry/_sources/api_doc/repository/base.rst.txt new file mode 100644 index 0000000000..7ced0273ac --- /dev/null +++ b/dev/entry/_sources/api_doc/repository/base.rst.txt @@ -0,0 +1,16 @@ +hfutils.repository.base +============================================= + +.. currentmodule:: hfutils.repository.base + +.. automodule:: hfutils.repository.base + + + +hf_hub_repo_url +---------------------------------- + +.. autofunction:: hf_hub_repo_url + + + diff --git a/dev/entry/_sources/api_doc/repository/clone.rst.txt b/dev/entry/_sources/api_doc/repository/clone.rst.txt new file mode 100644 index 0000000000..61d8caeb88 --- /dev/null +++ b/dev/entry/_sources/api_doc/repository/clone.rst.txt @@ -0,0 +1,16 @@ +hfutils.repository.clone +============================================= + +.. currentmodule:: hfutils.repository.clone + +.. automodule:: hfutils.repository.clone + + + +hf_hub_clone +--------------------------------- + +.. autofunction:: hf_hub_clone + + + diff --git a/dev/entry/_sources/api_doc/repository/index.rst.txt b/dev/entry/_sources/api_doc/repository/index.rst.txt new file mode 100644 index 0000000000..a5246287b1 --- /dev/null +++ b/dev/entry/_sources/api_doc/repository/index.rst.txt @@ -0,0 +1,15 @@ +hfutils.repository +===================== + +.. currentmodule:: hfutils.repository + +.. automodule:: hfutils.repository + + +.. toctree:: + :maxdepth: 3 + + base + clone + rollback + diff --git a/dev/entry/_sources/api_doc/repository/rollback.rst.txt b/dev/entry/_sources/api_doc/repository/rollback.rst.txt new file mode 100644 index 0000000000..15c39eda16 --- /dev/null +++ b/dev/entry/_sources/api_doc/repository/rollback.rst.txt @@ -0,0 +1,16 @@ +hfutils.repository.rollback +============================================= + +.. currentmodule:: hfutils.repository.rollback + +.. automodule:: hfutils.repository.rollback + + + +hf_hub_rollback +----------------------------- + +.. autofunction:: hf_hub_rollback + + + diff --git a/dev/entry/_sources/api_doc/utils/binary.rst.txt b/dev/entry/_sources/api_doc/utils/binary.rst.txt new file mode 100644 index 0000000000..9b6d35b614 --- /dev/null +++ b/dev/entry/_sources/api_doc/utils/binary.rst.txt @@ -0,0 +1,15 @@ +hfutils.utils.binary +================================= + +.. currentmodule:: hfutils.utils.binary + +.. automodule:: hfutils.utils.binary + + +is_binary_file +--------------------------- + +.. autofunction:: is_binary_file + + + diff --git a/dev/entry/_sources/api_doc/utils/download.rst.txt b/dev/entry/_sources/api_doc/utils/download.rst.txt new file mode 100644 index 0000000000..42a4c3b29e --- /dev/null +++ b/dev/entry/_sources/api_doc/utils/download.rst.txt @@ -0,0 +1,15 @@ +hfutils.utils.download +================================= + +.. currentmodule:: hfutils.utils.download + +.. automodule:: hfutils.utils.download + + +download_file +--------------------------- + +.. autofunction:: download_file + + + diff --git a/dev/entry/_sources/api_doc/utils/index.rst.txt b/dev/entry/_sources/api_doc/utils/index.rst.txt new file mode 100644 index 0000000000..ecb408601e --- /dev/null +++ b/dev/entry/_sources/api_doc/utils/index.rst.txt @@ -0,0 +1,17 @@ +hfutils.utils +===================== + +.. currentmodule:: hfutils.utils + +.. automodule:: hfutils.utils + + +.. toctree:: + :maxdepth: 3 + + binary + download + path + tqdm_ + walk + diff --git a/dev/entry/_sources/api_doc/utils/path.rst.txt b/dev/entry/_sources/api_doc/utils/path.rst.txt new file mode 100644 index 0000000000..4418c54259 --- /dev/null +++ b/dev/entry/_sources/api_doc/utils/path.rst.txt @@ -0,0 +1,36 @@ +hfutils.utils.path +================================= + +.. currentmodule:: hfutils.utils.path + +.. automodule:: hfutils.utils.path + + +hf_normpath +-------------------------------------------- + +.. autofunction:: hf_normpath + + + +hf_fs_path +-------------------------------------------- + +.. autofunction:: hf_fs_path + + + +parse_hf_fs_path +-------------------------------------------- + +.. autofunction:: parse_hf_fs_path + + + +HfFileSystemPath +-------------------------------------------- + +.. autoclass:: HfFileSystemPath + + + diff --git a/dev/entry/_sources/api_doc/utils/tqdm_.rst.txt b/dev/entry/_sources/api_doc/utils/tqdm_.rst.txt new file mode 100644 index 0000000000..633a1e6dd9 --- /dev/null +++ b/dev/entry/_sources/api_doc/utils/tqdm_.rst.txt @@ -0,0 +1,15 @@ +hfutils.utils.tqdm_ +================================= + +.. currentmodule:: hfutils.utils.tqdm_ + +.. automodule:: hfutils.utils.tqdm_ + + +tqdm +--------------------------- + +.. autofunction:: tqdm + + + diff --git a/dev/entry/_sources/api_doc/utils/walk.rst.txt b/dev/entry/_sources/api_doc/utils/walk.rst.txt new file mode 100644 index 0000000000..b9e499a55f --- /dev/null +++ b/dev/entry/_sources/api_doc/utils/walk.rst.txt @@ -0,0 +1,14 @@ +hfutils.utils.walk +================================= + +.. currentmodule:: hfutils.utils.walk + +.. automodule:: hfutils.utils.walk + + +walk_files +-------------------------------- + +.. autofunction:: walk_files + + diff --git a/dev/entry/_sources/index.rst.txt b/dev/entry/_sources/index.rst.txt new file mode 100644 index 0000000000..0083002d67 --- /dev/null +++ b/dev/entry/_sources/index.rst.txt @@ -0,0 +1,42 @@ +Welcome to hfutils's Documentation +========================================================= + +Overview +------------- + +``hfutils`` is a module with useful utilities for huggingface. + +.. toctree:: + :maxdepth: 2 + :caption: Tutorials + + tutorials/installation/index + tutorials/quick_start/index + +.. toctree:: + :maxdepth: 2 + :caption: Best Practice + +.. toctree:: + :maxdepth: 2 + :caption: Information + + information/environment.result + +.. toctree:: + :maxdepth: 2 + :caption: API Documentation + + api_doc/archive/index + api_doc/cache/index + api_doc/config/index + api_doc/entry/index + api_doc/index/index + api_doc/operate/index + api_doc/repository/index + api_doc/utils/index + +.. toctree:: + :maxdepth: 2 + :caption: Contributor Guide + diff --git a/dev/entry/_sources/information/environment.ipynb.txt b/dev/entry/_sources/information/environment.ipynb.txt new file mode 100644 index 0000000000..27039e1234 --- /dev/null +++ b/dev/entry/_sources/information/environment.ipynb.txt @@ -0,0 +1,88 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "# Run Environment Information" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "Here is the information from the running environment." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "import os\n", + "import platform\n", + "import shutil\n", + "\n", + "import cpuinfo\n", + "import psutil\n", + "from hbutils.scale import size_to_bytes_str\n", + "\n", + "print('OS:', platform.platform())\n", + "print('Python:', platform.python_implementation(), platform.python_version())\n", + "print('CPU Brand:', cpuinfo.get_cpu_info()[\"brand_raw\"])\n", + "print('CPU Count:', os.cpu_count())\n", + "print('CPU Freq:', psutil.cpu_freq().current, 'MHz')\n", + "print('Memory Size:', size_to_bytes_str(psutil.virtual_memory().total, precision=3))\n", + "print('Has CUDA:', 'Yes' if shutil.which('nvidia-smi') else 'No')" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "Please note that, this information in deployed documentation is automatically executed on Github Action. Therefore, some performance data may be different with your local environment" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/dev/entry/_sources/information/environment.result.ipynb.txt b/dev/entry/_sources/information/environment.result.ipynb.txt new file mode 100644 index 0000000000..90263a1368 --- /dev/null +++ b/dev/entry/_sources/information/environment.result.ipynb.txt @@ -0,0 +1,114 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "# Run Environment Information" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "Here is the information from the running environment." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "execution": { + "iopub.execute_input": "2024-07-21T07:22:54.938901Z", + "iopub.status.busy": "2024-07-21T07:22:54.938694Z", + "iopub.status.idle": "2024-07-21T07:22:56.111878Z", + "shell.execute_reply": "2024-07-21T07:22:56.111130Z" + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "OS: Linux-6.5.0-1023-azure-x86_64-with-glibc2.34\n", + "Python: CPython 3.8.18\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "CPU Brand: AMD EPYC 7763 64-Core Processor\n", + "CPU Count: 4\n", + "CPU Freq: 2976.9235 MHz\n", + "Memory Size: 15.606 GiB\n", + "Has CUDA: No\n" + ] + } + ], + "source": [ + "import os\n", + "import platform\n", + "import shutil\n", + "\n", + "import cpuinfo\n", + "import psutil\n", + "from hbutils.scale import size_to_bytes_str\n", + "\n", + "print('OS:', platform.platform())\n", + "print('Python:', platform.python_implementation(), platform.python_version())\n", + "print('CPU Brand:', cpuinfo.get_cpu_info()[\"brand_raw\"])\n", + "print('CPU Count:', os.cpu_count())\n", + "print('CPU Freq:', psutil.cpu_freq().current, 'MHz')\n", + "print('Memory Size:', size_to_bytes_str(psutil.virtual_memory().total, precision=3))\n", + "print('Has CUDA:', 'Yes' if shutil.which('nvidia-smi') else 'No')" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "Please note that, this information in deployed documentation is automatically executed on Github Action. Therefore, some performance data may be different with your local environment" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.18" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/dev/entry/_sources/tutorials/installation/index.rst.txt b/dev/entry/_sources/tutorials/installation/index.rst.txt new file mode 100644 index 0000000000..cfd5d05b10 --- /dev/null +++ b/dev/entry/_sources/tutorials/installation/index.rst.txt @@ -0,0 +1,33 @@ +Installation +=================== + +hfutils is currently hosted on PyPI. It required python >= 3.8. + +You can simply install hfutils from PyPI with the following command: + +.. code:: shell + + pip install hfutils + +You can also install with the newest version through GitHub: + +.. code:: shell + + pip install -U git+https://github.com/deepghs/hfutils@main + +You can check your installation by the following python \ +script: + +.. literalinclude:: install_check.demo.py + :language: python + :linenos: + +The output should be like below, which means your installation \ +is successful. + +.. literalinclude:: install_check.demo.py.txt + :language: text + :linenos: + +hfutils is still under development, you can also check out the \ +documents in stable version through `https://deepghs.github.io/hfutils/main/index.html `_. diff --git a/dev/entry/_sources/tutorials/quick_start/index.rst.txt b/dev/entry/_sources/tutorials/quick_start/index.rst.txt new file mode 100644 index 0000000000..66eed78d15 --- /dev/null +++ b/dev/entry/_sources/tutorials/quick_start/index.rst.txt @@ -0,0 +1,4 @@ +Quick Start +======================= + +faq \ No newline at end of file diff --git a/dev/entry/_static/SimHei.ttf b/dev/entry/_static/SimHei.ttf new file mode 100644 index 0000000000..60a4819db8 Binary files /dev/null and b/dev/entry/_static/SimHei.ttf differ diff --git a/dev/entry/_static/_sphinx_javascript_frameworks_compat.js b/dev/entry/_static/_sphinx_javascript_frameworks_compat.js new file mode 100644 index 0000000000..81415803ec --- /dev/null +++ b/dev/entry/_static/_sphinx_javascript_frameworks_compat.js @@ -0,0 +1,123 @@ +/* Compatability shim for jQuery and underscores.js. + * + * Copyright Sphinx contributors + * Released under the two clause BSD licence + */ + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} diff --git a/dev/entry/_static/basic.css b/dev/entry/_static/basic.css new file mode 100644 index 0000000000..cfc60b86c7 --- /dev/null +++ b/dev/entry/_static/basic.css @@ -0,0 +1,921 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/dev/entry/_static/css/badge_only.css b/dev/entry/_static/css/badge_only.css new file mode 100644 index 0000000000..c718cee441 --- /dev/null +++ b/dev/entry/_static/css/badge_only.css @@ -0,0 +1 @@ +.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} \ No newline at end of file diff --git a/dev/entry/_static/css/custom.css b/dev/entry/_static/css/custom.css new file mode 100644 index 0000000000..1ad5ffee99 --- /dev/null +++ b/dev/entry/_static/css/custom.css @@ -0,0 +1,4 @@ +.wy-table-responsive table td, +.wy-table-responsive table th { + white-space: normal; +} \ No newline at end of file diff --git a/dev/entry/_static/css/fonts/Roboto-Slab-Bold.woff b/dev/entry/_static/css/fonts/Roboto-Slab-Bold.woff new file mode 100644 index 0000000000..6cb6000018 Binary files /dev/null and b/dev/entry/_static/css/fonts/Roboto-Slab-Bold.woff differ diff --git a/dev/entry/_static/css/fonts/Roboto-Slab-Bold.woff2 b/dev/entry/_static/css/fonts/Roboto-Slab-Bold.woff2 new file mode 100644 index 0000000000..7059e23142 Binary files /dev/null and b/dev/entry/_static/css/fonts/Roboto-Slab-Bold.woff2 differ diff --git a/dev/entry/_static/css/fonts/Roboto-Slab-Regular.woff b/dev/entry/_static/css/fonts/Roboto-Slab-Regular.woff new file mode 100644 index 0000000000..f815f63f99 Binary files /dev/null and b/dev/entry/_static/css/fonts/Roboto-Slab-Regular.woff differ diff --git a/dev/entry/_static/css/fonts/Roboto-Slab-Regular.woff2 b/dev/entry/_static/css/fonts/Roboto-Slab-Regular.woff2 new file mode 100644 index 0000000000..f2c76e5bda Binary files /dev/null and b/dev/entry/_static/css/fonts/Roboto-Slab-Regular.woff2 differ diff --git a/dev/entry/_static/css/fonts/fontawesome-webfont.eot b/dev/entry/_static/css/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000000..e9f60ca953 Binary files /dev/null and b/dev/entry/_static/css/fonts/fontawesome-webfont.eot differ diff --git a/dev/entry/_static/css/fonts/fontawesome-webfont.svg b/dev/entry/_static/css/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000000..855c845e53 --- /dev/null +++ b/dev/entry/_static/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/entry/_static/css/fonts/fontawesome-webfont.ttf b/dev/entry/_static/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000000..35acda2fa1 Binary files /dev/null and b/dev/entry/_static/css/fonts/fontawesome-webfont.ttf differ diff --git a/dev/entry/_static/css/fonts/fontawesome-webfont.woff b/dev/entry/_static/css/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000000..400014a4b0 Binary files /dev/null and b/dev/entry/_static/css/fonts/fontawesome-webfont.woff differ diff --git a/dev/entry/_static/css/fonts/fontawesome-webfont.woff2 b/dev/entry/_static/css/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000000..4d13fc6040 Binary files /dev/null and b/dev/entry/_static/css/fonts/fontawesome-webfont.woff2 differ diff --git a/dev/entry/_static/css/fonts/lato-bold-italic.woff b/dev/entry/_static/css/fonts/lato-bold-italic.woff new file mode 100644 index 0000000000..88ad05b9ff Binary files /dev/null and b/dev/entry/_static/css/fonts/lato-bold-italic.woff differ diff --git a/dev/entry/_static/css/fonts/lato-bold-italic.woff2 b/dev/entry/_static/css/fonts/lato-bold-italic.woff2 new file mode 100644 index 0000000000..c4e3d804b5 Binary files /dev/null and b/dev/entry/_static/css/fonts/lato-bold-italic.woff2 differ diff --git a/dev/entry/_static/css/fonts/lato-bold.woff b/dev/entry/_static/css/fonts/lato-bold.woff new file mode 100644 index 0000000000..c6dff51f06 Binary files /dev/null and b/dev/entry/_static/css/fonts/lato-bold.woff differ diff --git a/dev/entry/_static/css/fonts/lato-bold.woff2 b/dev/entry/_static/css/fonts/lato-bold.woff2 new file mode 100644 index 0000000000..bb195043cf Binary files /dev/null and b/dev/entry/_static/css/fonts/lato-bold.woff2 differ diff --git a/dev/entry/_static/css/fonts/lato-normal-italic.woff b/dev/entry/_static/css/fonts/lato-normal-italic.woff new file mode 100644 index 0000000000..76114bc033 Binary files /dev/null and b/dev/entry/_static/css/fonts/lato-normal-italic.woff differ diff --git a/dev/entry/_static/css/fonts/lato-normal-italic.woff2 b/dev/entry/_static/css/fonts/lato-normal-italic.woff2 new file mode 100644 index 0000000000..3404f37e2e Binary files /dev/null and b/dev/entry/_static/css/fonts/lato-normal-italic.woff2 differ diff --git a/dev/entry/_static/css/fonts/lato-normal.woff b/dev/entry/_static/css/fonts/lato-normal.woff new file mode 100644 index 0000000000..ae1307ff5f Binary files /dev/null and b/dev/entry/_static/css/fonts/lato-normal.woff differ diff --git a/dev/entry/_static/css/fonts/lato-normal.woff2 b/dev/entry/_static/css/fonts/lato-normal.woff2 new file mode 100644 index 0000000000..3bf9843328 Binary files /dev/null and b/dev/entry/_static/css/fonts/lato-normal.woff2 differ diff --git a/dev/entry/_static/css/theme.css b/dev/entry/_static/css/theme.css new file mode 100644 index 0000000000..19a446a0e7 --- /dev/null +++ b/dev/entry/_static/css/theme.css @@ -0,0 +1,4 @@ +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .eqno .headerlink:before,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .eqno .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a button.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-left.toctree-expand,.wy-menu-vertical li button.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .eqno .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a button.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-right.toctree-expand,.wy-menu-vertical li button.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .eqno .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a button.pull-left.toctree-expand,.wy-menu-vertical li.on a button.pull-left.toctree-expand,.wy-menu-vertical li button.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .eqno .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a button.pull-right.toctree-expand,.wy-menu-vertical li.on a button.pull-right.toctree-expand,.wy-menu-vertical li button.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before,.icon-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before,.icon-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before,.icon-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:""}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before,.icon-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before,.icon-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:""}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before,.icon-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before,.icon-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before,.wy-menu-vertical li button.toctree-expand:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before,.icon-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content .eqno .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content .eqno a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content p a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li a button.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content .eqno .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content p .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li button.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content .eqno .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a button.toctree-expand,.btn .wy-menu-vertical li.on a button.toctree-expand,.btn .wy-menu-vertical li button.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content .eqno .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a button.toctree-expand,.nav .wy-menu-vertical li.on a button.toctree-expand,.nav .wy-menu-vertical li button.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .eqno .btn .headerlink,.rst-content .eqno .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p .btn .headerlink,.rst-content p .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn button.toctree-expand,.wy-menu-vertical li.current>a .btn button.toctree-expand,.wy-menu-vertical li.current>a .nav button.toctree-expand,.wy-menu-vertical li .nav button.toctree-expand,.wy-menu-vertical li.on a .btn button.toctree-expand,.wy-menu-vertical li.on a .nav button.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .eqno .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li button.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .eqno .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li button.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .eqno .btn .fa-large.headerlink,.rst-content .eqno .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p .btn .fa-large.headerlink,.rst-content p .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn button.fa-large.toctree-expand,.wy-menu-vertical li .nav button.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .eqno .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li button.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .eqno .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li button.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .eqno .btn .fa-spin.headerlink,.rst-content .eqno .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p .btn .fa-spin.headerlink,.rst-content p .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn button.fa-spin.toctree-expand,.wy-menu-vertical li .nav button.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content .eqno .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li button.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content .eqno .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li button.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content .eqno .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li button.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content .eqno .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini button.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:"";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.rst-content .toctree-wrapper ol li p:last-child,.rst-content .toctree-wrapper ol li ul,.rst-content section ol.arabic li ul,.rst-content section ol li p:last-child,.rst-content section ol li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol.arabic li ul li,.rst-content .section ol li ul li,.rst-content .toctree-wrapper ol.arabic li ul li,.rst-content .toctree-wrapper ol li ul li,.rst-content section ol.arabic li ul li,.rst-content section ol li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:""}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs>li{display:inline-block;padding-top:5px}.wy-breadcrumbs>li.wy-breadcrumbs-aside{float:right}.rst-content .wy-breadcrumbs>li code,.rst-content .wy-breadcrumbs>li tt,.wy-breadcrumbs>li .rst-content tt,.wy-breadcrumbs>li code{all:inherit;color:inherit}.breadcrumb-item:before{content:"/";color:#bbb;font-size:13px;padding:0 6px 0 3px}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li button.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d;border:none;background:none;padding:0}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover button.toctree-expand,.wy-menu-vertical li.on a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 button.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 button.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover button.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active button.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#2980b9;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em;max-width:100%}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search>a:hover{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.version{margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:""}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:""}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .eqno .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content .eqno .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li button.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version button.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}.rst-content .toctree-wrapper>p.caption,.rst-content h1,.rst-content h2,.rst-content h3,.rst-content h4,.rst-content h5,.rst-content h6{margin-bottom:24px}.rst-content img{max-width:100%;height:auto}.rst-content div.figure,.rst-content figure{margin-bottom:24px}.rst-content div.figure .caption-text,.rst-content figure .caption-text{font-style:italic}.rst-content div.figure p:last-child.caption,.rst-content figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center,.rst-content figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img,.rst-content section>a>img,.rst-content section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:"\f08e";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp,.rst-content div.highlight span.linenos{user-select:none;pointer-events:none}.rst-content div.highlight span.linenos{display:inline-block;padding-left:0;padding-right:12px;margin-right:12px;border-right:1px solid #e6e9ea}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li,.rst-content .toctree-wrapper ol.loweralpha,.rst-content .toctree-wrapper ol.loweralpha>li,.rst-content section ol.loweralpha,.rst-content section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li,.rst-content .toctree-wrapper ol.upperalpha,.rst-content .toctree-wrapper ol.upperalpha>li,.rst-content section ol.upperalpha,.rst-content section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*,.rst-content .toctree-wrapper ol li>*,.rst-content .toctree-wrapper ul li>*,.rst-content section ol li>*,.rst-content section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child,.rst-content .toctree-wrapper ol li>:first-child,.rst-content .toctree-wrapper ul li>:first-child,.rst-content section ol li>:first-child,.rst-content section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child,.rst-content .toctree-wrapper ol li>p,.rst-content .toctree-wrapper ol li>p:last-child,.rst-content .toctree-wrapper ul li>p,.rst-content .toctree-wrapper ul li>p:last-child,.rst-content section ol li>p,.rst-content section ol li>p:last-child,.rst-content section ul li>p,.rst-content section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child,.rst-content .toctree-wrapper ol li>p:only-child,.rst-content .toctree-wrapper ol li>p:only-child:last-child,.rst-content .toctree-wrapper ul li>p:only-child,.rst-content .toctree-wrapper ul li>p:only-child:last-child,.rst-content section ol li>p:only-child,.rst-content section ol li>p:only-child:last-child,.rst-content section ul li>p:only-child,.rst-content section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul,.rst-content .toctree-wrapper ol li>ol,.rst-content .toctree-wrapper ol li>ul,.rst-content .toctree-wrapper ul li>ol,.rst-content .toctree-wrapper ul li>ul,.rst-content section ol li>ol,.rst-content section ol li>ul,.rst-content section ul li>ol,.rst-content section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul,.rst-content .toctree-wrapper ol.simple li>*,.rst-content .toctree-wrapper ol.simple li ol,.rst-content .toctree-wrapper ol.simple li ul,.rst-content .toctree-wrapper ul.simple li>*,.rst-content .toctree-wrapper ul.simple li ol,.rst-content .toctree-wrapper ul.simple li ul,.rst-content section ol.simple li>*,.rst-content section ol.simple li ol,.rst-content section ol.simple li ul,.rst-content section ul.simple li>*,.rst-content section ul.simple li ol,.rst-content section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink{opacity:0;font-size:14px;font-family:FontAwesome;margin-left:.5em}.rst-content .code-block-caption .headerlink:focus,.rst-content .code-block-caption:hover .headerlink,.rst-content .eqno .headerlink:focus,.rst-content .eqno:hover .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink:focus,.rst-content .toctree-wrapper>p.caption:hover .headerlink,.rst-content dl dt .headerlink:focus,.rst-content dl dt:hover .headerlink,.rst-content h1 .headerlink:focus,.rst-content h1:hover .headerlink,.rst-content h2 .headerlink:focus,.rst-content h2:hover .headerlink,.rst-content h3 .headerlink:focus,.rst-content h3:hover .headerlink,.rst-content h4 .headerlink:focus,.rst-content h4:hover .headerlink,.rst-content h5 .headerlink:focus,.rst-content h5:hover .headerlink,.rst-content h6 .headerlink:focus,.rst-content h6:hover .headerlink,.rst-content p.caption .headerlink:focus,.rst-content p.caption:hover .headerlink,.rst-content p .headerlink:focus,.rst-content p:hover .headerlink,.rst-content table>caption .headerlink:focus,.rst-content table>caption:hover .headerlink{opacity:1}.rst-content p a{overflow-wrap:anywhere}.rst-content .wy-table td p,.rst-content .wy-table td ul,.rst-content .wy-table th p,.rst-content .wy-table th ul,.rst-content table.docutils td p,.rst-content table.docutils td ul,.rst-content table.docutils th p,.rst-content table.docutils th ul,.rst-content table.field-list td p,.rst-content table.field-list td ul,.rst-content table.field-list th p,.rst-content table.field-list th ul{font-size:inherit}.rst-content .btn:focus{outline:2px solid}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .citation-reference>span.fn-bracket,.rst-content .footnote-reference>span.fn-bracket{display:none}.rst-content .hlist{width:100%}.rst-content dl dt span.classifier:before{content:" : "}.rst-content dl dt span.classifier-delimiter{display:none!important}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:auto minmax(80%,95%)}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{display:inline-grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{display:grid;grid-template-columns:auto auto minmax(.65rem,auto) minmax(40%,95%)}html.writer-html5 .rst-content aside.citation>span.label,html.writer-html5 .rst-content aside.footnote>span.label,html.writer-html5 .rst-content div.citation>span.label{grid-column-start:1;grid-column-end:2}html.writer-html5 .rst-content aside.citation>span.backrefs,html.writer-html5 .rst-content aside.footnote>span.backrefs,html.writer-html5 .rst-content div.citation>span.backrefs{grid-column-start:2;grid-column-end:3;grid-row-start:1;grid-row-end:3}html.writer-html5 .rst-content aside.citation>p,html.writer-html5 .rst-content aside.footnote>p,html.writer-html5 .rst-content div.citation>p{grid-column-start:4;grid-column-end:5}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{margin-bottom:24px}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.citation>dt>span.brackets:before,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:"["}html.writer-html5 .rst-content dl.citation>dt>span.brackets:after,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:"]"}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a{word-break:keep-all}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a:not(:first-child):before,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.citation>dd p,html.writer-html5 .rst-content dl.footnote>dd p{font-size:.9rem}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{padding-left:1rem;padding-right:1rem;font-size:.9rem;line-height:1.2rem}html.writer-html5 .rst-content aside.citation p,html.writer-html5 .rst-content aside.footnote p,html.writer-html5 .rst-content div.citation p{font-size:.9rem;line-height:1.2rem;margin-bottom:12px}html.writer-html5 .rst-content aside.citation span.backrefs,html.writer-html5 .rst-content aside.footnote span.backrefs,html.writer-html5 .rst-content div.citation span.backrefs{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content aside.citation span.backrefs>a,html.writer-html5 .rst-content aside.footnote span.backrefs>a,html.writer-html5 .rst-content div.citation span.backrefs>a{word-break:keep-all}html.writer-html5 .rst-content aside.citation span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content aside.footnote span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content div.citation span.backrefs>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content aside.citation span.label,html.writer-html5 .rst-content aside.footnote span.label,html.writer-html5 .rst-content div.citation span.label{line-height:1.2rem}html.writer-html5 .rst-content aside.citation-list,html.writer-html5 .rst-content aside.footnote-list,html.writer-html5 .rst-content div.citation-list{margin-bottom:24px}html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content aside.footnote-list aside.footnote,html.writer-html5 .rst-content div.citation-list>div.citation,html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content aside.footnote-list aside.footnote code,html.writer-html5 .rst-content aside.footnote-list aside.footnote tt,html.writer-html5 .rst-content aside.footnote code,html.writer-html5 .rst-content aside.footnote tt,html.writer-html5 .rst-content div.citation-list>div.citation code,html.writer-html5 .rst-content div.citation-list>div.citation tt,html.writer-html5 .rst-content dl.citation code,html.writer-html5 .rst-content dl.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040;overflow-wrap:normal}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}.rst-content dl dd>ol:last-child,.rst-content dl dd>p:last-child,.rst-content dl dd>table:last-child,.rst-content dl dd>ul:last-child{margin-bottom:0}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px;max-width:100%}html.writer-html4 .rst-content dl:not(.docutils) .k,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .k{font-style:italic}html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel,.rst-content .menuselection{font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content .guilabel,.rst-content .menuselection{border:1px solid #7fbbe3;background:#e7f2fa}.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>.kbd,.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>kbd{color:inherit;font-size:80%;background-color:#fff;border:1px solid #a6a6a6;border-radius:4px;box-shadow:0 2px grey;padding:2.4px 6px;margin:auto 0}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format("woff2"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format("woff");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format("woff2"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format("woff");font-display:block} \ No newline at end of file diff --git a/dev/entry/_static/doctools.js b/dev/entry/_static/doctools.js new file mode 100644 index 0000000000..d06a71d751 --- /dev/null +++ b/dev/entry/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/dev/entry/_static/documentation_options.js b/dev/entry/_static/documentation_options.js new file mode 100644 index 0000000000..5182ffa48d --- /dev/null +++ b/dev/entry/_static/documentation_options.js @@ -0,0 +1,14 @@ +var DOCUMENTATION_OPTIONS = { + URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), + VERSION: '0.2.11', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/dev/entry/_static/file.png b/dev/entry/_static/file.png new file mode 100644 index 0000000000..a858a410e4 Binary files /dev/null and b/dev/entry/_static/file.png differ diff --git a/dev/entry/_static/graphviz.css b/dev/entry/_static/graphviz.css new file mode 100644 index 0000000000..8d81c02ed9 --- /dev/null +++ b/dev/entry/_static/graphviz.css @@ -0,0 +1,19 @@ +/* + * graphviz.css + * ~~~~~~~~~~~~ + * + * Sphinx stylesheet -- graphviz extension. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +img.graphviz { + border: 0; + max-width: 100%; +} + +object.graphviz { + max-width: 100%; +} diff --git a/dev/entry/_static/jquery.js b/dev/entry/_static/jquery.js new file mode 100644 index 0000000000..c4c6022f29 --- /dev/null +++ b/dev/entry/_static/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/dev/entry/_static/js/html5shiv.min.js b/dev/entry/_static/js/html5shiv.min.js new file mode 100644 index 0000000000..cd1c674f5e --- /dev/null +++ b/dev/entry/_static/js/html5shiv.min.js @@ -0,0 +1,4 @@ +/** +* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/dev/entry/_static/js/theme.js b/dev/entry/_static/js/theme.js new file mode 100644 index 0000000000..1fddb6ee4a --- /dev/null +++ b/dev/entry/_static/js/theme.js @@ -0,0 +1 @@ +!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/dev/entry/_static/minus.png b/dev/entry/_static/minus.png new file mode 100644 index 0000000000..d96755fdaf Binary files /dev/null and b/dev/entry/_static/minus.png differ diff --git a/dev/entry/_static/nbsphinx-broken-thumbnail.svg b/dev/entry/_static/nbsphinx-broken-thumbnail.svg new file mode 100644 index 0000000000..4919ca8829 --- /dev/null +++ b/dev/entry/_static/nbsphinx-broken-thumbnail.svg @@ -0,0 +1,9 @@ + + + + diff --git a/dev/entry/_static/nbsphinx-code-cells.css b/dev/entry/_static/nbsphinx-code-cells.css new file mode 100644 index 0000000000..a3fb27c30f --- /dev/null +++ b/dev/entry/_static/nbsphinx-code-cells.css @@ -0,0 +1,259 @@ +/* remove conflicting styling from Sphinx themes */ +div.nbinput.container div.prompt *, +div.nboutput.container div.prompt *, +div.nbinput.container div.input_area pre, +div.nboutput.container div.output_area pre, +div.nbinput.container div.input_area .highlight, +div.nboutput.container div.output_area .highlight { + border: none; + padding: 0; + margin: 0; + box-shadow: none; +} + +div.nbinput.container > div[class*=highlight], +div.nboutput.container > div[class*=highlight] { + margin: 0; +} + +div.nbinput.container div.prompt *, +div.nboutput.container div.prompt * { + background: none; +} + +div.nboutput.container div.output_area .highlight, +div.nboutput.container div.output_area pre { + background: unset; +} + +div.nboutput.container div.output_area div.highlight { + color: unset; /* override Pygments text color */ +} + +/* avoid gaps between output lines */ +div.nboutput.container div[class*=highlight] pre { + line-height: normal; +} + +/* input/output containers */ +div.nbinput.container, +div.nboutput.container { + display: -webkit-flex; + display: flex; + align-items: flex-start; + margin: 0; + width: 100%; +} +@media (max-width: 540px) { + div.nbinput.container, + div.nboutput.container { + flex-direction: column; + } +} + +/* input container */ +div.nbinput.container { + padding-top: 5px; +} + +/* last container */ +div.nblast.container { + padding-bottom: 5px; +} + +/* input prompt */ +div.nbinput.container div.prompt pre, +/* for sphinx_immaterial theme: */ +div.nbinput.container div.prompt pre > code { + color: #307FC1; +} + +/* output prompt */ +div.nboutput.container div.prompt pre, +/* for sphinx_immaterial theme: */ +div.nboutput.container div.prompt pre > code { + color: #BF5B3D; +} + +/* all prompts */ +div.nbinput.container div.prompt, +div.nboutput.container div.prompt { + width: 4.5ex; + padding-top: 5px; + position: relative; + user-select: none; +} + +div.nbinput.container div.prompt > div, +div.nboutput.container div.prompt > div { + position: absolute; + right: 0; + margin-right: 0.3ex; +} + +@media (max-width: 540px) { + div.nbinput.container div.prompt, + div.nboutput.container div.prompt { + width: unset; + text-align: left; + padding: 0.4em; + } + div.nboutput.container div.prompt.empty { + padding: 0; + } + + div.nbinput.container div.prompt > div, + div.nboutput.container div.prompt > div { + position: unset; + } +} + +/* disable scrollbars and line breaks on prompts */ +div.nbinput.container div.prompt pre, +div.nboutput.container div.prompt pre { + overflow: hidden; + white-space: pre; +} + +/* input/output area */ +div.nbinput.container div.input_area, +div.nboutput.container div.output_area { + -webkit-flex: 1; + flex: 1; + overflow: auto; +} +@media (max-width: 540px) { + div.nbinput.container div.input_area, + div.nboutput.container div.output_area { + width: 100%; + } +} + +/* input area */ +div.nbinput.container div.input_area { + border: 1px solid #e0e0e0; + border-radius: 2px; + /*background: #f5f5f5;*/ +} + +/* override MathJax center alignment in output cells */ +div.nboutput.container div[class*=MathJax] { + text-align: left !important; +} + +/* override sphinx.ext.imgmath center alignment in output cells */ +div.nboutput.container div.math p { + text-align: left; +} + +/* standard error */ +div.nboutput.container div.output_area.stderr { + background: #fdd; +} + +/* ANSI colors */ +.ansi-black-fg { color: #3E424D; } +.ansi-black-bg { background-color: #3E424D; } +.ansi-black-intense-fg { color: #282C36; } +.ansi-black-intense-bg { background-color: #282C36; } +.ansi-red-fg { color: #E75C58; } +.ansi-red-bg { background-color: #E75C58; } +.ansi-red-intense-fg { color: #B22B31; } +.ansi-red-intense-bg { background-color: #B22B31; } +.ansi-green-fg { color: #00A250; } +.ansi-green-bg { background-color: #00A250; } +.ansi-green-intense-fg { color: #007427; } +.ansi-green-intense-bg { background-color: #007427; } +.ansi-yellow-fg { color: #DDB62B; } +.ansi-yellow-bg { background-color: #DDB62B; } +.ansi-yellow-intense-fg { color: #B27D12; } +.ansi-yellow-intense-bg { background-color: #B27D12; } +.ansi-blue-fg { color: #208FFB; } +.ansi-blue-bg { background-color: #208FFB; } +.ansi-blue-intense-fg { color: #0065CA; } +.ansi-blue-intense-bg { background-color: #0065CA; } +.ansi-magenta-fg { color: #D160C4; } +.ansi-magenta-bg { background-color: #D160C4; } +.ansi-magenta-intense-fg { color: #A03196; } +.ansi-magenta-intense-bg { background-color: #A03196; } +.ansi-cyan-fg { color: #60C6C8; } +.ansi-cyan-bg { background-color: #60C6C8; } +.ansi-cyan-intense-fg { color: #258F8F; } +.ansi-cyan-intense-bg { background-color: #258F8F; } +.ansi-white-fg { color: #C5C1B4; } +.ansi-white-bg { background-color: #C5C1B4; } +.ansi-white-intense-fg { color: #A1A6B2; } +.ansi-white-intense-bg { background-color: #A1A6B2; } + +.ansi-default-inverse-fg { color: #FFFFFF; } +.ansi-default-inverse-bg { background-color: #000000; } + +.ansi-bold { font-weight: bold; } +.ansi-underline { text-decoration: underline; } + + +div.nbinput.container div.input_area div[class*=highlight] > pre, +div.nboutput.container div.output_area div[class*=highlight] > pre, +div.nboutput.container div.output_area div[class*=highlight].math, +div.nboutput.container div.output_area.rendered_html, +div.nboutput.container div.output_area > div.output_javascript, +div.nboutput.container div.output_area:not(.rendered_html) > img{ + padding: 5px; + margin: 0; +} + +/* fix copybtn overflow problem in chromium (needed for 'sphinx_copybutton') */ +div.nbinput.container div.input_area > div[class^='highlight'], +div.nboutput.container div.output_area > div[class^='highlight']{ + overflow-y: hidden; +} + +/* hide copy button on prompts for 'sphinx_copybutton' extension ... */ +.prompt .copybtn, +/* ... and 'sphinx_immaterial' theme */ +.prompt .md-clipboard.md-icon { + display: none; +} + +/* Some additional styling taken form the Jupyter notebook CSS */ +.jp-RenderedHTMLCommon table, +div.rendered_html table { + border: none; + border-collapse: collapse; + border-spacing: 0; + color: black; + font-size: 12px; + table-layout: fixed; +} +.jp-RenderedHTMLCommon thead, +div.rendered_html thead { + border-bottom: 1px solid black; + vertical-align: bottom; +} +.jp-RenderedHTMLCommon tr, +.jp-RenderedHTMLCommon th, +.jp-RenderedHTMLCommon td, +div.rendered_html tr, +div.rendered_html th, +div.rendered_html td { + text-align: right; + vertical-align: middle; + padding: 0.5em 0.5em; + line-height: normal; + white-space: normal; + max-width: none; + border: none; +} +.jp-RenderedHTMLCommon th, +div.rendered_html th { + font-weight: bold; +} +.jp-RenderedHTMLCommon tbody tr:nth-child(odd), +div.rendered_html tbody tr:nth-child(odd) { + background: #f5f5f5; +} +.jp-RenderedHTMLCommon tbody tr:hover, +div.rendered_html tbody tr:hover { + background: rgba(66, 165, 245, 0.2); +} + diff --git a/dev/entry/_static/nbsphinx-gallery.css b/dev/entry/_static/nbsphinx-gallery.css new file mode 100644 index 0000000000..365c27a96b --- /dev/null +++ b/dev/entry/_static/nbsphinx-gallery.css @@ -0,0 +1,31 @@ +.nbsphinx-gallery { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); + gap: 5px; + margin-top: 1em; + margin-bottom: 1em; +} + +.nbsphinx-gallery > a { + padding: 5px; + border: 1px dotted currentColor; + border-radius: 2px; + text-align: center; +} + +.nbsphinx-gallery > a:hover { + border-style: solid; +} + +.nbsphinx-gallery img { + max-width: 100%; + max-height: 100%; +} + +.nbsphinx-gallery > a > div:first-child { + display: flex; + align-items: start; + justify-content: center; + height: 120px; + margin-bottom: 5px; +} diff --git a/dev/entry/_static/nbsphinx-no-thumbnail.svg b/dev/entry/_static/nbsphinx-no-thumbnail.svg new file mode 100644 index 0000000000..9dca7588fa --- /dev/null +++ b/dev/entry/_static/nbsphinx-no-thumbnail.svg @@ -0,0 +1,9 @@ + + + + diff --git a/dev/entry/_static/plus.png b/dev/entry/_static/plus.png new file mode 100644 index 0000000000..7107cec93a Binary files /dev/null and b/dev/entry/_static/plus.png differ diff --git a/dev/entry/_static/pygments.css b/dev/entry/_static/pygments.css new file mode 100644 index 0000000000..84ab3030a9 --- /dev/null +++ b/dev/entry/_static/pygments.css @@ -0,0 +1,75 @@ +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #008000; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #9C6500 } /* Comment.Preproc */ +.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.highlight .gr { color: #E40000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #008400 } /* Generic.Inserted */ +.highlight .go { color: #717171 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #008000 } /* Keyword.Pseudo */ +.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #B00040 } /* Keyword.Type */ +.highlight .m { color: #666666 } /* Literal.Number */ +.highlight .s { color: #BA2121 } /* Literal.String */ +.highlight .na { color: #687822 } /* Name.Attribute */ +.highlight .nb { color: #008000 } /* Name.Builtin */ +.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.highlight .no { color: #880000 } /* Name.Constant */ +.highlight .nd { color: #AA22FF } /* Name.Decorator */ +.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0000FF } /* Name.Function */ +.highlight .nl { color: #767600 } /* Name.Label */ +.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #19177C } /* Name.Variable */ +.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #666666 } /* Literal.Number.Bin */ +.highlight .mf { color: #666666 } /* Literal.Number.Float */ +.highlight .mh { color: #666666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +.highlight .sa { color: #BA2121 } /* Literal.String.Affix */ +.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ +.highlight .sc { color: #BA2121 } /* Literal.String.Char */ +.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ +.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #BA2121 } /* Literal.String.Double */ +.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ +.highlight .sx { color: #008000 } /* Literal.String.Other */ +.highlight .sr { color: #A45A77 } /* Literal.String.Regex */ +.highlight .s1 { color: #BA2121 } /* Literal.String.Single */ +.highlight .ss { color: #19177C } /* Literal.String.Symbol */ +.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0000FF } /* Name.Function.Magic */ +.highlight .vc { color: #19177C } /* Name.Variable.Class */ +.highlight .vg { color: #19177C } /* Name.Variable.Global */ +.highlight .vi { color: #19177C } /* Name.Variable.Instance */ +.highlight .vm { color: #19177C } /* Name.Variable.Magic */ +.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/dev/entry/_static/searchtools.js b/dev/entry/_static/searchtools.js new file mode 100644 index 0000000000..97d56a74d8 --- /dev/null +++ b/dev/entry/_static/searchtools.js @@ -0,0 +1,566 @@ +/* + * searchtools.js + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for the full-text search. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _displayItem = (item, searchTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + + const [docName, title, anchor, descr, score, _filename] = item; + + let listItem = document.createElement("li"); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = docUrlRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = docUrlRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = title; + if (descr) + listItem.appendChild(document.createElement("span")).innerHTML = + " (" + descr + ")"; + else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms) + ); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." + ); + else + Search.status.innerText = _( + `Search finished, found ${resultCount} page(s) matching the search query.` + ); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms), + 5 + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter(term => term) // remove remaining empty strings +} + +/** + * Search Module + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent !== undefined) return docContent.textContent; + console.warn( + "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + Search.title = out.appendChild(searchText); + Search.dots = Search.title.appendChild(document.createElement("span")); + Search.status = out.appendChild(searchSummary); + Search.output = out.appendChild(searchList); + + const searchProgress = document.getElementById("search-progress"); + // Some themes don't use the search progress node + if (searchProgress) { + searchProgress.innerText = _("Preparing search..."); + } + Search.startPulse(); + + // index already loaded, the browser was quick! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + /** + * execute search (requires search index to be loaded) + */ + query: (query) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords array is from language_data.js + if ( + stopwords.indexOf(queryTermLower) !== -1 || + queryTerm.match(/^\d+$/) + ) + return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + // array of [docname, title, anchor, descr, score, filename] + let results = []; + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + let score = Math.round(100 * queryLower.length / title.length) + results.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id] of foundEntries) { + let score = Math.round(100 * queryLower.length / entry.length) + results.push([ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // lookup as object + objectTerms.forEach((term) => + results.push(...Search.performObjectSearch(term, objectTerms)) + ); + + // lookup as search terms in fulltext + results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); + + // now sort the results by score (in opposite order of appearance, since the + // display function below uses pop() to retrieve items) and then + // alphabetically + results.sort((a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; + }); + + // remove duplicate search results + // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept + let seen = new Set(); + results = results.reverse().reduce((acc, result) => { + let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); + if (!seen.has(resultStr)) { + acc.push(result); + seen.add(resultStr); + } + return acc; + }, []); + + results = results.reverse(); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4] + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const parts = fullnameLower.split("."); + + // check for different match types: exact matches of full name or + // "last name" (i.e. last dotted part) + if (fullnameLower === object || parts.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + const title = titles[match[0]]; + + // If more than one term searched for, we require other words to be + // found in the name/title/description + const otherTerms = new Set(objectTerms); + otherTerms.delete(object); + if (otherTerms.size > 0) { + const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); + if ( + [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) + ) + return; + } + + let anchor = match[3]; + if (anchor === "") anchor = fullname; + else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; + + const descr = objName + _(", in ") + title; + + // add custom score for some objects according to scorer + if (Scorer.objPrio.hasOwnProperty(match[2])) + score += Scorer.objPrio[match[2]]; + else score += Scorer.objPrioDefault; + + results.push([ + docNames[match[0]], + fullname, + "#" + anchor, + descr, + score, + filenames[match[0]], + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => + objectSearchCallback(prefix, array) + ) + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + const arr = [ + { files: terms[word], score: Scorer.term }, + { files: titleTerms[word], score: Scorer.title }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord) && !terms[word]) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord) && !titleTerms[word]) + arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); + }); + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, {}); + scoreMap.get(file)[word] = record.score; + }); + }); + + // create the mapping + files.forEach((file) => { + if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) + fileMap.get(file).push(word); + else fileMap.set(file, [word]); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2 + ).length; + if ( + wordList.length !== searchTerms.size && + wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file || + titleTerms[term] === file || + (terms[term] || []).includes(file) || + (titleTerms[term] || []).includes(file) + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords) => { + const text = Search.htmlToText(htmlText); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/dev/entry/_static/sphinx_highlight.js b/dev/entry/_static/sphinx_highlight.js new file mode 100644 index 0000000000..aae669d7ea --- /dev/null +++ b/dev/entry/_static/sphinx_highlight.js @@ -0,0 +1,144 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + parent.insertBefore( + span, + parent.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms") + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + + // get individual terms from highlight string + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(SphinxHighlight.highlightSearchWords); +_ready(SphinxHighlight.initEscapeListener); diff --git a/dev/entry/api_doc/archive/index.html b/dev/entry/api_doc/archive/index.html new file mode 100644 index 0000000000..a1d583cf8a --- /dev/null +++ b/dev/entry/api_doc/archive/index.html @@ -0,0 +1,362 @@ + + + + + + + hfutils.archive — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.archive

+
+
Overview:

Archive pack and unpack management.

+
+
+

Supported Formats:

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Format

Extension Name

7z

.7z

bztar

.tar.bz2, .tbz2

gztar

.tar.gz, .tgz

rar

.rar

tar

.tar

xztar

.tar.xz, .txz

zip

.zip

+
+
+

Note

+

If you require support for 7z and RAR formats, simply install hfutils using the following code:

+
pip install hfutils[7z]
+pip install hfutils[rar]
+
+
+
+
+

Warning

+

The creation of archive files in the RAR format is not supported, as we utilize the rarfile library, which does not offer functionality for creating RAR files.

+
+
+

register_archive_type

+
+
+hfutils.archive.register_archive_type(name: str, exts: List[str], fn_pack: Callable, fn_unpack: Callable)[source]
+

Register a custom archive type with associated file extensions and packing/unpacking functions.

+
+
Parameters:
+
    +
  • name (str) – The name of the archive type.

  • +
  • exts (List[str]) – A list of file extensions associated with the archive type.

  • +
  • fn_pack (Callable) – The packing function that takes a directory and an archive filename as input and creates an archive.

  • +
  • fn_unpack (Callable) – The unpacking function that takes an archive filename and a directory as input and extracts the archive.

  • +
+
+
+
+ +
+
+

archive_pack

+
+
+hfutils.archive.archive_pack(type_name: str, directory: str, archive_file: str, silent: bool = False, clear: bool = False)[source]
+

Pack a directory into an archive file using the specified archive type.

+
+
Parameters:
+
    +
  • type_name (str) – The name of the archive type.

  • +
  • directory (str) – The directory to pack.

  • +
  • archive_file (str) – The filename of the resulting archive.

  • +
  • silent (bool) – If True, suppress warnings during the packing process.

  • +
  • clear (bool) – If True, remove existing files when packing.

  • +
+
+
Returns:
+

The path to the created archive file.

+
+
Return type:
+

str

+
+
+
+ +
+
+

archive_unpack

+
+
+hfutils.archive.archive_unpack(archive_file: str, directory: str, silent: bool = False, password: str | None = None)[source]
+

Unpack an archive file into a directory using the specified archive type.

+
+
Parameters:
+
    +
  • archive_file (str) – The filename of the archive.

  • +
  • directory (str) – The directory to unpack the contents into.

  • +
  • silent (bool) – If True, suppress warnings during the unpacking process.

  • +
  • password (str, optional) – The password to extract the archive file.

  • +
+
+
Returns:
+

The path to the unpacked directory.

+
+
Return type:
+

str

+
+
+
+ +
+
+

get_archive_type

+
+
+hfutils.archive.get_archive_type(archive_file: str) str[source]
+

Determine the archive type based on the file extension.

+
+
Parameters:
+

archive_file (str) – The filename of the archive.

+
+
Returns:
+

The name of the archive type.

+
+
Return type:
+

str

+
+
Raises:
+

ValueError – If the file extension is not associated with any registered archive type.

+
+
+
+ +
+
+

get_archive_extname

+
+
+hfutils.archive.get_archive_extname(type_name: str) str[source]
+

Get the file extension associated with a registered archive type.

+
+
Parameters:
+

type_name (str) – The name of the archive type.

+
+
Returns:
+

The file extension associated with the archive type.

+
+
Return type:
+

str

+
+
Raises:
+

ValueError – If the archive type is not registered.

+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/cache/delete.html b/dev/entry/api_doc/cache/delete.html new file mode 100644 index 0000000000..3f23b753c6 --- /dev/null +++ b/dev/entry/api_doc/cache/delete.html @@ -0,0 +1,225 @@ + + + + + + + hfutils.cache.delete — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.cache.delete

+
+

delete_detached_cache

+
+
+hfutils.cache.delete.delete_detached_cache(repo_id: str | None = None, repo_type: str | None = None, cache_dir: str | None = None)[source]
+

Deletes all detached revisions from the cache that match the specified repository ID and type.

+
+
Parameters:
+
    +
  • repo_id (Optional[str]) – The repository ID to match. If None, matches any ID.

  • +
  • repo_type (Optional[str]) – The repository type to match. If None, matches any type.

  • +
  • cache_dir (Optional[str]) – The directory where the cache is stored. If None, uses the default directory.

  • +
+
+
+
+ +
+
+

delete_cache

+
+
+hfutils.cache.delete.delete_cache(repo_id: str | None = None, repo_type: str | None = None, cache_dir: str | None = None)[source]
+

Deletes all revisions from the cache that match the specified repository ID and type.

+
+
Parameters:
+
    +
  • repo_id (Optional[str]) – The repository ID to match. If None, matches any ID.

  • +
  • repo_type (Optional[str]) – The repository type to match. If None, matches any type.

  • +
  • cache_dir (Optional[str]) – The directory where the cache is stored. If None, uses the default directory.

  • +
+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/cache/index.html b/dev/entry/api_doc/cache/index.html new file mode 100644 index 0000000000..d90aec298f --- /dev/null +++ b/dev/entry/api_doc/cache/index.html @@ -0,0 +1,198 @@ + + + + + + + hfutils.cache — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.cache

+
+
Overview:

Huggingface local cache management.

+

Can quickly manage the local cache and make the disk space under control.

+
+
+ +
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/config/index.html b/dev/entry/api_doc/config/index.html new file mode 100644 index 0000000000..d82c51f951 --- /dev/null +++ b/dev/entry/api_doc/config/index.html @@ -0,0 +1,205 @@ + + + + + + + hfutils.config — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/config/meta.html b/dev/entry/api_doc/config/meta.html new file mode 100644 index 0000000000..23626d6410 --- /dev/null +++ b/dev/entry/api_doc/config/meta.html @@ -0,0 +1,250 @@ + + + + + + + hfutils.config.meta — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.config.meta

+
+
Overview:

Meta information for hfutils package.

+
+
+
+

__TITLE__

+
+
+hfutils.config.meta.__TITLE__
+

Title of this project (should be hfutils).

+
+ +
+
+

__VERSION__

+
+
+hfutils.config.meta.__VERSION__
+

Version of this project.

+
+ +
+
+

__DESCRIPTION__

+
+
+hfutils.config.meta.__DESCRIPTION__
+

Short description of the project, will be included in setup.py.

+
+ +
+
+

__AUTHOR__

+
+
+hfutils.config.meta.__AUTHOR__
+

Author of this project.

+
+ +
+
+

__AUTHOR_EMAIL__

+
+
+hfutils.config.meta.__AUTHOR_EMAIL__
+

Email of the authors’.

+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/entry/base.html b/dev/entry/api_doc/entry/base.html new file mode 100644 index 0000000000..35dc9bc3f1 --- /dev/null +++ b/dev/entry/api_doc/entry/base.html @@ -0,0 +1,377 @@ + + + + + + + hfutils.entry.base — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.entry.base

+
+

CONTEXT_SETTINGS

+
+
+hfutils.entry.base.CONTEXT_SETTINGS = {'help_option_names': ['-h', '--help']}
+

dict() -> new empty dictionary +dict(mapping) -> new dictionary initialized from a mapping object’s

+
+

(key, value) pairs

+
+
+
dict(iterable) -> new dictionary initialized as if via:

d = {} +for k, v in iterable:

+
+

d[k] = v

+
+
+
dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

+
+
+
+ +
+
+

ClickWarningException

+
+
+class hfutils.entry.base.ClickWarningException(message: str)[source]
+

Custom exception class for displaying warnings in yellow color.

+
+
Parameters:
+

message (str) – The error message.

+
+
+
+
+exit_code = 1
+

The exit code for this exception.

+
+ +
+
+show(file: IO | None = None) None[source]
+

Display the warning message in yellow.

+
+
Parameters:
+

file (Optional[IO]) – File to write the output to.

+
+
+
+ +
+ +
+
+

ClickErrorException

+
+
+class hfutils.entry.base.ClickErrorException(message: str)[source]
+

Custom exception class for displaying errors in red color.

+
+
Parameters:
+

message (str) – The error message.

+
+
+
+
+exit_code = 1
+

The exit code for this exception.

+
+ +
+
+show(file: IO | None = None) None[source]
+

Display the error message in red.

+
+
Parameters:
+

file (Optional[IO]) – File to write the output to.

+
+
+
+ +
+ +
+ +
+

KeyboardInterrupted

+
+
+class hfutils.entry.base.KeyboardInterrupted(msg=None)[source]
+

Exception class for handling keyboard interruptions.

+
+
Parameters:
+

msg (Optional[str]) – Custom message to display.

+
+
+
+
+__init__(msg=None)[source]
+

Initialize the exception.

+
+
Parameters:
+

msg (Optional[str]) – Custom message to display.

+
+
+
+ +
+
+exit_code = 7
+

The exit code for this exception.

+
+ +
+
+show(file: IO | None = None) None
+

Display the warning message in yellow.

+
+
Parameters:
+

file (Optional[IO]) – File to write the output to.

+
+
+
+ +
+ +
+
+

command_wrap

+
+
+hfutils.entry.base.command_wrap()[source]
+

Decorator for wrapping Click commands.

+

This decorator catches exceptions and provides consistent error handling.

+
+
Returns:
+

Decorator function.

+
+
Return type:
+

Callable

+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/entry/cli.html b/dev/entry/api_doc/entry/cli.html new file mode 100644 index 0000000000..d73808dfaf --- /dev/null +++ b/dev/entry/api_doc/entry/cli.html @@ -0,0 +1,203 @@ + + + + + + + hfutils.entry.cli — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.entry.cli

+
+

cli

+
+
+hfutils.entry.cli.cli = <Group hfutilcli>
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/entry/clone.html b/dev/entry/api_doc/entry/clone.html new file mode 100644 index 0000000000..95500b6541 --- /dev/null +++ b/dev/entry/api_doc/entry/clone.html @@ -0,0 +1,189 @@ + + + + + + + hfutils.entry.clone — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.entry.clone

+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/entry/dispatch.html b/dev/entry/api_doc/entry/dispatch.html new file mode 100644 index 0000000000..abb3be08a8 --- /dev/null +++ b/dev/entry/api_doc/entry/dispatch.html @@ -0,0 +1,219 @@ + + + + + + + hfutils.entry.dispatch — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.entry.dispatch

+ +
+

hfutilcli

+
+
+hfutils.entry.dispatch.hfutilcli(*args: Any, **kwargs: Any) Any
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/entry/download.html b/dev/entry/api_doc/entry/download.html new file mode 100644 index 0000000000..4c3194e2ed --- /dev/null +++ b/dev/entry/api_doc/entry/download.html @@ -0,0 +1,221 @@ + + + + + + + hfutils.entry.download — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.entry.download

+
+

NoRemotePathAssignedWithDownload

+
+
+class hfutils.entry.download.NoRemotePathAssignedWithDownload(message: str)[source]
+

Custom exception class for indicating that no remote path in the repository is assigned.

+
+
+exit_code = 17
+

The exit code for this exception.

+
+ +
+
+show(file: IO | None = None) None
+

Display the error message in red.

+
+
Parameters:
+

file (Optional[IO]) – File to write the output to.

+
+
+
+ +
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/entry/index.html b/dev/entry/api_doc/entry/index.html new file mode 100644 index 0000000000..4424c2bb3f --- /dev/null +++ b/dev/entry/api_doc/entry/index.html @@ -0,0 +1,273 @@ + + + + + + + hfutils.entry — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/entry/index_.html b/dev/entry/api_doc/entry/index_.html new file mode 100644 index 0000000000..2f8d2cffc9 --- /dev/null +++ b/dev/entry/api_doc/entry/index_.html @@ -0,0 +1,196 @@ + + + + + + + hfutils.entry.index — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.entry.index

+

This module provides functionality for creating and managing index repositories for tar archives stored in Hugging Face repositories.

+

The main features of this module include: +- Adding an ‘index’ subcommand to a Click CLI application +- Creating index files for tar archives +- Uploading index files to a specified Hugging Face repository +- Managing the upload process with a minimum interval between uploads

+

The module uses the Hugging Face file system and client for interacting with repositories.

+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/entry/ls.html b/dev/entry/api_doc/entry/ls.html new file mode 100644 index 0000000000..2b0e654352 --- /dev/null +++ b/dev/entry/api_doc/entry/ls.html @@ -0,0 +1,256 @@ + + + + + + + hfutils.entry.ls — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.entry.ls

+
+

ListItemType

+
+
+enum hfutils.entry.ls.ListItemType(value)[source]
+

Enum class representing different types of list items.

+

Valid values are as follows:

+
+
+FILE = <ListItemType.FILE: 1>
+
+ +
+
+FOLDER = <ListItemType.FOLDER: 2>
+
+ +
+
+IMAGE = <ListItemType.IMAGE: 3>
+
+ +
+
+ARCHIVE = <ListItemType.ARCHIVE: 4>
+
+ +
+
+MODEL = <ListItemType.MODEL: 5>
+
+ +
+
+DATA = <ListItemType.DATA: 6>
+
+ +
+ +
+
+

ListItem

+
+
+class hfutils.entry.ls.ListItem(item: RepoFolder | RepoFile, base_dir: str)[source]
+

Class representing a list item.

+
+
Parameters:
+
    +
  • item (Union[RepoFolder, RepoFile]) – The item object.

  • +
  • base_dir (str) – The base directory.

  • +
+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/entry/ls_repo.html b/dev/entry/api_doc/entry/ls_repo.html new file mode 100644 index 0000000000..9c1ab9e865 --- /dev/null +++ b/dev/entry/api_doc/entry/ls_repo.html @@ -0,0 +1,204 @@ + + + + + + + hfutils.entry.ls_repo — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.entry.ls_repo

+
+

NoLocalAuthentication

+
+
+class hfutils.entry.ls_repo.NoLocalAuthentication(message: str)[source]
+

Exception raised when there is no local authentication token.

+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/entry/rollback.html b/dev/entry/api_doc/entry/rollback.html new file mode 100644 index 0000000000..8871bbbc29 --- /dev/null +++ b/dev/entry/api_doc/entry/rollback.html @@ -0,0 +1,189 @@ + + + + + + + hfutils.entry.rollback — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.entry.rollback

+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/entry/upload.html b/dev/entry/api_doc/entry/upload.html new file mode 100644 index 0000000000..adb5ca3d68 --- /dev/null +++ b/dev/entry/api_doc/entry/upload.html @@ -0,0 +1,221 @@ + + + + + + + hfutils.entry.upload — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.entry.upload

+
+

NoRemotePathAssignedWithUpload

+
+
+class hfutils.entry.upload.NoRemotePathAssignedWithUpload(message: str)[source]
+

Custom exception class for indicating that no remote path in the repository is assigned.

+
+
+exit_code = 33
+

The exit code for this exception.

+
+ +
+
+show(file: IO | None = None) None
+

Display the error message in red.

+
+
Parameters:
+

file (Optional[IO]) – File to write the output to.

+
+
+
+ +
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/entry/whoami.html b/dev/entry/api_doc/entry/whoami.html new file mode 100644 index 0000000000..38aeddc4c3 --- /dev/null +++ b/dev/entry/api_doc/entry/whoami.html @@ -0,0 +1,189 @@ + + + + + + + hfutils.entry.whoami — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.entry.whoami

+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/index/fetch.html b/dev/entry/api_doc/index/fetch.html new file mode 100644 index 0000000000..5a329996b1 --- /dev/null +++ b/dev/entry/api_doc/index/fetch.html @@ -0,0 +1,618 @@ + + + + + + + hfutils.index.fetch — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.index.fetch

+
+

ArchiveStandaloneFileIncompleteDownload

+
+
+class hfutils.index.fetch.ArchiveStandaloneFileIncompleteDownload[source]
+

Exception raised when a standalone file in an archive is incompletely downloaded.

+
+ +
+
+

ArchiveStandaloneFileHashNotMatch

+
+
+class hfutils.index.fetch.ArchiveStandaloneFileHashNotMatch[source]
+

Exception raised when the hash of a standalone file in an archive does not match.

+
+ +
+
+

hf_tar_get_index

+
+
+hfutils.index.fetch.hf_tar_get_index(repo_id: str, archive_in_repo: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', idx_repo_id: str | None = None, idx_file_in_repo: str | None = None, idx_repo_type: Literal['dataset', 'model', 'space'] | None = None, idx_revision: str | None = None, hf_token: str | None = None)[source]
+

Get the index of a tar archive file in a Hugging Face repository.

+
+
Parameters:
+
    +
  • repo_id (str) – The identifier of the repository.

  • +
  • archive_in_repo (str) – The path to the archive file in the repository.

  • +
  • repo_type (RepoTypeTyping, optional) – The type of the Hugging Face repository.

  • +
  • revision (str, optional) – The revision of the repository.

  • +
  • idx_repo_id (str, optional) – The identifier of the index repository.

  • +
  • idx_file_in_repo (str, optional) – The path to the index file in the index repository.

  • +
  • idx_repo_type (RepoTypeTyping, optional) – The type of the index repository.

  • +
  • idx_revision (str, optional) – The revision of the index repository.

  • +
  • hf_token (str, optional) – The Hugging Face access token.

  • +
+
+
Returns:
+

The index of the tar archive file.

+
+
Return type:
+

Dict

+
+
+
+
Examples::
>>> from hfutils.index import hf_tar_get_index
+>>>
+>>> idx = hf_tar_get_index(
+...     repo_id='deepghs/danbooru_newest',
+...     archive_in_repo='images/0000.tar',
+... )
+>>> idx.keys()
+dict_keys(['filesize', 'hash', 'hash_lfs', 'files'])
+>>> idx['files'].keys()
+dict_keys(['7507000.jpg', '7506000.jpg', '7505000.jpg', ...])
+
+
+
+
+
+

Note

+

Besides, if the tar and index files are in different repositories, you can also use this function to +get the index information by explicitly assigning the idx_repo_id argument.

+
>>> from hfutils.index import hf_tar_get_index
+>>>
+>>> idx = hf_tar_get_index(
+...     repo_id='nyanko7/danbooru2023',
+...     idx_repo_id='deepghs/danbooru2023_index',
+...     archive_in_repo='original/data-0000.tar',
+... )
+>>> idx.keys()
+dict_keys(['filesize', 'hash', 'hash_lfs', 'files'])
+>>> idx['files'].keys()
+dict_keys(['./1000.png', './10000.jpg', './100000.jpg', ...])
+
+
+
+
+ +
+
+

hf_tar_list_files

+
+
+hfutils.index.fetch.hf_tar_list_files(repo_id: str, archive_in_repo: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', idx_repo_id: str | None = None, idx_file_in_repo: str | None = None, idx_repo_type: Literal['dataset', 'model', 'space'] | None = None, idx_revision: str | None = None, hf_token: str | None = None)[source]
+

List files inside a tar archive file in a Hugging Face repository.

+
+
Parameters:
+
    +
  • repo_id (str) – The identifier of the repository.

  • +
  • archive_in_repo (str) – The path to the archive file in the repository.

  • +
  • repo_type (RepoTypeTyping, optional) – The type of the Hugging Face repository.

  • +
  • revision (str, optional) – The revision of the repository.

  • +
  • idx_repo_id (str, optional) – The identifier of the index repository.

  • +
  • idx_file_in_repo (str, optional) – The path to the index file in the index repository.

  • +
  • idx_repo_type (RepoTypeTyping, optional) – The type of the index repository.

  • +
  • idx_revision (str, optional) – The revision of the index repository.

  • +
  • hf_token (str, optional) – The Hugging Face access token.

  • +
+
+
Returns:
+

The list of files inside the tar archive.

+
+
Return type:
+

List[str]

+
+
+
+
Examples::
>>> from hfutils.index import hf_tar_list_files
+>>>
+>>> hf_tar_list_files(
+...     repo_id='deepghs/danbooru_newest',
+...     archive_in_repo='images/0000.tar',
+... )
+['7507000.jpg', '7506000.jpg', '7505000.jpg', ...]
+
+
+
+
+
+

Note

+

Besides, if the tar and index files are in different repositories, you can also use this function to +list all the files by explicitly assigning the idx_repo_id argument.

+
>>> from hfutils.index import hf_tar_list_files
+>>>
+>>> hf_tar_list_files(
+...     repo_id='nyanko7/danbooru2023',
+...     idx_repo_id='deepghs/danbooru2023_index',
+...     archive_in_repo='original/data-0000.tar',
+... )
+['./1000.png', './10000.jpg', './100000.jpg', ...]
+
+
+
+
+ +
+
+

hf_tar_file_exists

+
+
+hfutils.index.fetch.hf_tar_file_exists(repo_id: str, archive_in_repo: str, file_in_archive: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', idx_repo_id: str | None = None, idx_file_in_repo: str | None = None, idx_repo_type: Literal['dataset', 'model', 'space'] | None = None, idx_revision: str | None = None, hf_token: str | None = None)[source]
+

Check if a file exists inside a tar archive file in a Hugging Face repository.

+
+
Parameters:
+
    +
  • repo_id (str) – The identifier of the repository.

  • +
  • archive_in_repo (str) – The path to the archive file in the repository.

  • +
  • file_in_archive (str) – The path to the file inside the archive.

  • +
  • repo_type (RepoTypeTyping, optional) – The type of the Hugging Face repository.

  • +
  • revision (str, optional) – The revision of the repository.

  • +
  • idx_repo_id (str, optional) – The identifier of the index repository.

  • +
  • idx_file_in_repo (str, optional) – The path to the index file in the index repository.

  • +
  • idx_repo_type (RepoTypeTyping, optional) – The type of the index repository.

  • +
  • idx_revision (str, optional) – The revision of the index repository.

  • +
  • hf_token (str, optional) – The Hugging Face access token.

  • +
+
+
Returns:
+

True if the file exists, False otherwise.

+
+
Return type:
+

bool

+
+
+
+
Examples::
>>> from hfutils.index import hf_tar_file_exists
+>>>
+>>> hf_tar_file_exists(
+...     repo_id='deepghs/danbooru_newest',
+...     archive_in_repo='images/0000.tar',
+...     file_in_archive='7506000.jpg',
+... )
+True
+>>> hf_tar_file_exists(
+...     repo_id='deepghs/danbooru_newest',
+...     archive_in_repo='images/0000.tar',
+...     file_in_archive='17506000.jpg',
+... )
+False
+
+
+
+
+
+

Note

+

Besides, if the tar and index files are in different repositories, you can also use this function to +check the file existence by explicitly assigning the idx_repo_id argument.

+
>>> from hfutils.index import hf_tar_file_exists
+>>>
+>>> hf_tar_file_exists(
+...     repo_id='nyanko7/danbooru2023',
+...     idx_repo_id='deepghs/danbooru2023_index',
+...     archive_in_repo='original/data-0000.tar',
+...     file_in_archive='1000.png'
+... )
+True
+>>> hf_tar_file_exists(
+...     repo_id='nyanko7/danbooru2023',
+...     idx_repo_id='deepghs/danbooru2023_index',
+...     archive_in_repo='original/data-0000.tar',
+...     file_in_archive='10000000001000.png'
+... )
+False
+
+
+
+
+ +
+
+

hf_tar_file_size

+
+
+hfutils.index.fetch.hf_tar_file_size(repo_id: str, archive_in_repo: str, file_in_archive: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', idx_repo_id: str | None = None, idx_file_in_repo: str | None = None, idx_repo_type: Literal['dataset', 'model', 'space'] | None = None, idx_revision: str | None = None, hf_token: str | None = None) int[source]
+

Get a file’s size in index tars.

+
+
Parameters:
+
    +
  • repo_id (str) – The identifier of the repository.

  • +
  • archive_in_repo (str) – The path to the archive file in the repository.

  • +
  • file_in_archive (str) – The path to the file inside the archive.

  • +
  • repo_type (RepoTypeTyping, optional) – The type of the Hugging Face repository.

  • +
  • revision (str, optional) – The revision of the repository.

  • +
  • idx_repo_id (str, optional) – The identifier of the index repository.

  • +
  • idx_file_in_repo (str, optional) – The path to the index file in the index repository.

  • +
  • idx_repo_type (RepoTypeTyping, optional) – The type of the index repository.

  • +
  • idx_revision (str, optional) – The revision of the index repository.

  • +
  • hf_token (str, optional) – The Hugging Face access token.

  • +
+
+
Returns:
+

Return an integer which represents the size of this file.

+
+
Return type:
+

int

+
+
Raises:
+

FileNotFoundError – Raise this when file not exist in tar archive.

+
+
+
+
Examples::
>>> from hfutils.index import hf_tar_file_size
+>>>
+>>> hf_tar_file_size(
+...     repo_id='deepghs/danbooru_newest',
+...     archive_in_repo='images/0000.tar',
+...     file_in_archive='7506000.jpg',
+... )
+435671
+
+
+
+
+
+

Note

+

Besides, if the tar and index files are in different repositories, you can also use this function to +get the file size by explicitly assigning the idx_repo_id argument.

+
>>> from hfutils.index import hf_tar_file_size
+>>>
+>>> hf_tar_file_size(
+...     repo_id='nyanko7/danbooru2023',
+...     idx_repo_id='deepghs/danbooru2023_index',
+...     archive_in_repo='original/data-0000.tar',
+...     file_in_archive='1000.png'
+... )
+11966
+
+
+
+
+ +
+
+

hf_tar_file_info

+
+
+hfutils.index.fetch.hf_tar_file_info(repo_id: str, archive_in_repo: str, file_in_archive: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', idx_repo_id: str | None = None, idx_file_in_repo: str | None = None, idx_repo_type: Literal['dataset', 'model', 'space'] | None = None, idx_revision: str | None = None, hf_token: str | None = None) dict[source]
+

Get a file’s detailed information in index tars, including offset, sha256 and size.

+
+
Parameters:
+
    +
  • repo_id (str) – The identifier of the repository.

  • +
  • archive_in_repo (str) – The path to the archive file in the repository.

  • +
  • file_in_archive (str) – The path to the file inside the archive.

  • +
  • repo_type (RepoTypeTyping, optional) – The type of the Hugging Face repository.

  • +
  • revision (str, optional) – The revision of the repository.

  • +
  • idx_repo_id (str, optional) – The identifier of the index repository.

  • +
  • idx_file_in_repo (str, optional) – The path to the index file in the index repository.

  • +
  • idx_repo_type (RepoTypeTyping, optional) – The type of the index repository.

  • +
  • idx_revision (str, optional) – The revision of the index repository.

  • +
  • hf_token (str, optional) – The Hugging Face access token.

  • +
+
+
Returns:
+

Return a dictionary object with meta information of this file.

+
+
Return type:
+

dict

+
+
Raises:
+

FileNotFoundError – Raise this when file not exist in tar archive.

+
+
+
+
Examples::
>>> from hfutils.index import hf_tar_file_info
+>>>
+>>> hf_tar_file_info(
+...     repo_id='deepghs/danbooru_newest',
+...     archive_in_repo='images/0000.tar',
+...     file_in_archive='7506000.jpg',
+... )
+{'offset': 265728, 'size': 435671, 'sha256': 'ef6a4e031fdffb705c8ce2c64e8cb8d993f431a887d7c1c0b1e6fa56e6107fcd'}
+
+
+
+
+
+

Note

+

Besides, if the tar and index files are in different repositories, you can also use this function to +get the file information by explicitly assigning the idx_repo_id argument.

+
>>> from hfutils.index import hf_tar_file_info
+>>>
+>>> hf_tar_file_info(
+...     repo_id='nyanko7/danbooru2023',
+...     idx_repo_id='deepghs/danbooru2023_index',
+...     archive_in_repo='original/data-0000.tar',
+...     file_in_archive='1000.png'
+... )
+{'offset': 1024, 'size': 11966, 'sha256': '478d3313860519372f6a75ede287d4a7c18a2d851bbc79b3dd65caff4c716858'}
+
+
+
+
+ +
+
+

hf_tar_file_download

+
+
+hfutils.index.fetch.hf_tar_file_download(repo_id: str, archive_in_repo: str, file_in_archive: str, local_file: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', idx_repo_id: str | None = None, idx_file_in_repo: str | None = None, idx_repo_type: Literal['dataset', 'model', 'space'] | None = None, idx_revision: str | None = None, proxies: Dict | None = None, user_agent: Dict | str | None = None, headers: Dict[str, str] | None = None, endpoint: str | None = None, hf_token: str | None = None)[source]
+

Download a file from a tar archive file in a Hugging Face repository.

+
+
Parameters:
+
    +
  • repo_id (str) – The identifier of the repository.

  • +
  • archive_in_repo (str) – The path to the archive file in the repository.

  • +
  • file_in_archive (str) – The path to the file inside the archive.

  • +
  • local_file (str) – The path to save the downloaded file locally.

  • +
  • repo_type (RepoTypeTyping, optional) – The type of the Hugging Face repository.

  • +
  • revision (str, optional) – The revision of the repository.

  • +
  • idx_repo_id (str, optional) – The identifier of the index repository.

  • +
  • idx_file_in_repo (str, optional) – The path to the index file in the index repository.

  • +
  • idx_repo_type (RepoTypeTyping, optional) – The type of the index repository.

  • +
  • idx_revision (str, optional) – The revision of the index repository.

  • +
  • proxies (Dict, optional) – The proxies to be used for the HTTP request.

  • +
  • user_agent (Union[Dict, str, None], optional) – The user agent for the HTTP request.

  • +
  • headers (Dict[str, str], optional) – The additional headers for the HTTP request.

  • +
  • endpoint (str, optional) – The Hugging Face API endpoint.

  • +
  • hf_token (str, optional) – The Hugging Face access token.

  • +
+
+
Raises:
+
+
+
+
+
Examples::
>>> from hfutils.index import hf_tar_file_download
+>>>
+>>> hf_tar_file_download(
+...     repo_id='deepghs/danbooru_newest',
+...     archive_in_repo='images/0000.tar',
+...     file_in_archive='7506000.jpg',
+...     local_file='test_example.jpg'  # download destination
+... )
+
+
+
+
+
+

Note

+

Besides, if the tar and index files are in different repositories, you can also use this function to +download the given file by explicitly assigning the idx_repo_id argument.

+
>>> from hfutils.index import hf_tar_file_download
+>>>
+>>> hf_tar_file_download(
+...     repo_id='nyanko7/danbooru2023',
+...     idx_repo_id='deepghs/danbooru2023_index',
+...     archive_in_repo='original/data-0000.tar',
+...     file_in_archive='1000.png',
+...     local_file='test_example.png'  # download destination
+... )
+
+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/index/index.html b/dev/entry/api_doc/index/index.html new file mode 100644 index 0000000000..767bd77185 --- /dev/null +++ b/dev/entry/api_doc/index/index.html @@ -0,0 +1,249 @@ + + + + + + + hfutils.index — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/index/make.html b/dev/entry/api_doc/index/make.html new file mode 100644 index 0000000000..be2a015e57 --- /dev/null +++ b/dev/entry/api_doc/index/make.html @@ -0,0 +1,305 @@ + + + + + + + hfutils.index.make — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.index.make

+
+

tar_create_index

+
+
+hfutils.index.make.tar_create_index(src_tar_file, dst_index_file: str | None = None, chunk_for_hash: int = 1048576, with_hash: bool = True, silent: bool = False)[source]
+

Create an index file for a tar archive file.

+
+
Parameters:
+
    +
  • src_tar_file (str) – The path to the source tar archive file.

  • +
  • dst_index_file (str, optional) – The path to save the index file, defaults to None.

  • +
  • chunk_for_hash (int, optional) – The chunk size for hashing, defaults to 1 << 20 (1 MB).

  • +
  • with_hash (bool, optional) – Whether to include file hashes in the index, defaults to True.

  • +
  • silent (bool, optional) – Whether to suppress progress bars and logging messages, defaults to False.

  • +
+
+
Returns:
+

The path to the created index file.

+
+
Return type:
+

str

+
+
+
+ +
+
+

hf_tar_create_index

+
+
+hfutils.index.make.hf_tar_create_index(repo_id: str, archive_in_repo: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', idx_repo_id: str | None = None, idx_file_in_repo: str | None = None, idx_repo_type: Literal['dataset', 'model', 'space'] | None = None, idx_revision: str | None = None, chunk_for_hash: int = 1048576, with_hash: bool = True, skip_when_synced: bool = True, hf_token: str | None = None)[source]
+

Create an index file for a tar archive file in a Hugging Face repository.

+
+
Parameters:
+
    +
  • repo_id (str) – The identifier of the repository.

  • +
  • archive_in_repo (str) – The path to the tar archive file.

  • +
  • repo_type (RepoTypeTyping, optional) – The type of the Hugging Face repository, defaults to ‘dataset’.

  • +
  • revision (str, optional) – The revision of the repository, defaults to ‘main’.

  • +
  • idx_repo_id (str, optional) – The identifier of the index repository, defaults to None.

  • +
  • idx_file_in_repo (str, optional) – The path to save the index file in the index repository, defaults to None.

  • +
  • idx_repo_type (RepoTypeTyping, optional) – The type of the index repository, defaults to None.

  • +
  • idx_revision (str, optional) – The revision of the index repository, defaults to None.

  • +
  • chunk_for_hash (int, optional) – The chunk size for hashing, defaults to 1 << 20 (1 MB).

  • +
  • with_hash (bool, optional) – Whether to include file hashes in the index, defaults to True.

  • +
  • skip_when_synced (bool) – Skip syncing when index is ready, defaults to True.

  • +
  • hf_token (str, optional) – The Hugging Face access token, defaults to None.

  • +
+
+
+
+ +
+
+

tar_get_index_info

+
+
+hfutils.index.make.tar_get_index_info(src_tar_file, chunk_for_hash: int = 1048576, with_hash: bool = True, silent: bool = False)[source]
+

Get the index information of a tar archive file.

+
+

Note

+

The return value of this function will be directly used as the index json file.

+
+
+
Parameters:
+
    +
  • src_tar_file (str) – The path to the source tar archive file.

  • +
  • chunk_for_hash (int, optional) – The chunk size for hashing, defaults to 1 << 20 (1 MB).

  • +
  • with_hash (bool, optional) – Whether to include file hashes in the index, defaults to True.

  • +
  • silent (bool, optional) – Whether to suppress progress bars and logging messages, defaults to False.

  • +
+
+
Returns:
+

The index information of the tar archive file.

+
+
Return type:
+

dict

+
+
+
+ +
+
+

hf_tar_create_from_directory

+
+
+hfutils.index.make.hf_tar_create_from_directory(repo_id: str, archive_in_repo: str, local_directory: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', chunk_for_hash: int = 1048576, with_hash: bool = True, silent: bool = False, hf_token: str | None = None)[source]
+

Create a tar archive file from a local directory and upload it to a Hugging Face repository.

+
+
Parameters:
+
    +
  • repo_id (str) – The identifier of the repository.

  • +
  • archive_in_repo (str) – The path to save the tar archive file in the repository.

  • +
  • local_directory (str) – The path to the local directory to be archived.

  • +
  • repo_type (RepoTypeTyping, optional) – The type of the Hugging Face repository, defaults to ‘dataset’.

  • +
  • revision (str, optional) – The revision of the repository, defaults to ‘main’.

  • +
  • chunk_for_hash (int, optional) – The chunk size for hashing, defaults to 1 << 20 (1 MB).

  • +
  • with_hash (bool, optional) – Whether to include file hashes in the index, defaults to True.

  • +
  • silent (bool, optional) – Whether to suppress progress bars and logging messages, defaults to False.

  • +
  • hf_token (str, optional) – The Hugging Face access token, defaults to None.

  • +
+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/index/validate.html b/dev/entry/api_doc/index/validate.html new file mode 100644 index 0000000000..5c7173c9b6 --- /dev/null +++ b/dev/entry/api_doc/index/validate.html @@ -0,0 +1,264 @@ + + + + + + + hfutils.index.validate — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.index.validate

+
+

hf_tar_item_validate

+
+
+hfutils.index.validate.hf_tar_item_validate(file_item: RepoFile, size: int, hash_: str | None = None, hash_lfs: str | None = None)[source]
+

Validate a file item in a tar archive.

+

This function checks if the file item matches the expected size and hash.

+
+
Parameters:
+
    +
  • file_item (RepoFile) – The file item from the Hugging Face repository.

  • +
  • size (int) – The expected size of the file.

  • +
  • hash (str, optional) – The expected SHA-1 hash of the file.

  • +
  • hash_lfs (str, optional) – The expected SHA-256 hash of the file if stored in LFS.

  • +
+
+
Returns:
+

True if the file item is valid, False otherwise.

+
+
Return type:
+

bool

+
+
+
+ +
+
+

hf_tar_validate

+
+
+hfutils.index.validate.hf_tar_validate(repo_id: str, archive_in_repo: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', idx_repo_id: str | None = None, idx_file_in_repo: str | None = None, idx_repo_type: Literal['dataset', 'model', 'space'] | None = None, idx_revision: str | None = None, hf_token: str | None = None)[source]
+

Validate a tar archive in a Hugging Face repository.

+

This function validates if the tar archive in the Hugging Face repository matches the expected size and hash.

+
+

Note

+

This function is based on Huggingface API and hash information in index files, no tar file will be downloaded.

+
+
+
Parameters:
+
    +
  • repo_id (str) – The ID of the Hugging Face repository.

  • +
  • archive_in_repo (str) – The path to the tar archive in the repository.

  • +
  • repo_type (RepoTypeTyping, optional) – The type of the Hugging Face repository, defaults to ‘dataset’.

  • +
  • revision (str, optional) – The revision of the repository, defaults to ‘main’.

  • +
  • idx_repo_id (Optional[str], optional) – The ID of the repository where the index file is stored.

  • +
  • idx_file_in_repo (Optional[str], optional) – The path to the index file in the repository.

  • +
  • idx_repo_type (Optional[RepoTypeTyping], optional) – The type of the repository where the index file is stored.

  • +
  • idx_revision (Optional[str], optional) – The revision of the repository where the index file is stored.

  • +
  • hf_token (Optional[str], optional) – The Hugging Face token for authentication, defaults to None.

  • +
+
+
Raises:
+
    +
  • EntryNotFoundError – If the specified entry is not found in the repository.

  • +
  • IsADirectoryError – If the specified entry is a directory.

  • +
+
+
Returns:
+

True if the tar archive is valid, False otherwise.

+
+
Return type:
+

bool

+
+
+
+

Note

+

If this function returns False, it means the json index is expired and need to be re-generated.

+

So this function and hfutils.index.make.hf_tar_create_index() can be used together to gracefully +refresh an indexed tar dataset.

+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/operate/base.html b/dev/entry/api_doc/operate/base.html new file mode 100644 index 0000000000..3115cfbb42 --- /dev/null +++ b/dev/entry/api_doc/operate/base.html @@ -0,0 +1,263 @@ + + + + + + + hfutils.operate.base — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.operate.base

+
+

get_hf_client

+
+
+hfutils.operate.base.get_hf_client(hf_token: str | None = None) HfApi[source]
+

Get the Hugging Face API client.

+
+
Parameters:
+

hf_token (str, optional) – Huggingface token for API client, use HF_TOKEN variable if not assigned.

+
+
Returns:
+

The Hugging Face API client.

+
+
Return type:
+

HfApi

+
+
+
+ +
+
+

get_hf_fs

+
+
+hfutils.operate.base.get_hf_fs(hf_token: str | None = None) HfFileSystem[source]
+

Get the Hugging Face file system.

+
+
Parameters:
+

hf_token (str, optional) – Huggingface token for API client, use HF_TOKEN variable if not assigned.

+
+
Returns:
+

The Hugging Face file system.

+
+
Return type:
+

HfFileSystem

+
+
+
+ +
+
+

list_files_in_repository

+
+
+hfutils.operate.base.list_files_in_repository(repo_id: str, repo_type: ~typing.Literal['dataset', 'model', 'space'] = 'dataset', subdir: str = '', revision: str = 'main', ignore_patterns: ~typing.List[str] = <object object>, hf_token: str | None = None) List[str][source]
+

List files in a Hugging Face repository based on the given parameters.

+
+
Parameters:
+
    +
  • repo_id (str) – The identifier of the repository.

  • +
  • repo_type (RepoTypeTyping) – The type of the repository (‘dataset’, ‘model’, ‘space’).

  • +
  • subdir (str) – The subdirectory to list files from.

  • +
  • revision (str) – The revision of the repository (e.g., branch, tag, commit hash).

  • +
  • ignore_patterns (List[str]) – List of file patterns to ignore.

  • +
  • hf_token (str, optional) – Huggingface token for API client, use HF_TOKEN variable if not assigned.

  • +
+
+
Returns:
+

A list of file paths.

+
+
Return type:
+

List[str]

+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/operate/download.html b/dev/entry/api_doc/operate/download.html new file mode 100644 index 0000000000..606d917a8e --- /dev/null +++ b/dev/entry/api_doc/operate/download.html @@ -0,0 +1,266 @@ + + + + + + + hfutils.operate.download — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.operate.download

+
+

download_file_to_file

+
+
+hfutils.operate.download.download_file_to_file(local_file: str, repo_id: str, file_in_repo: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', resume_download: bool = True, hf_token: str | None = None)[source]
+

Download a file from a Hugging Face repository and save it to a local file.

+
+
Parameters:
+
    +
  • local_file (str) – The local file path to save the downloaded file.

  • +
  • repo_id (str) – The identifier of the repository.

  • +
  • file_in_repo (str) – The file path within the repository.

  • +
  • repo_type (RepoTypeTyping) – The type of the repository (‘dataset’, ‘model’, ‘space’).

  • +
  • revision (str) – The revision of the repository (e.g., branch, tag, commit hash).

  • +
  • resume_download (bool) – Resume the existing download.

  • +
  • hf_token (str, optional) – Huggingface token for API client, use HF_TOKEN variable if not assigned.

  • +
+
+
+
+ +
+
+

download_archive_as_directory

+
+
+hfutils.operate.download.download_archive_as_directory(local_directory: str, repo_id: str, file_in_repo: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', password: str | None = None, hf_token: str | None = None)[source]
+

Download an archive file from a Hugging Face repository and extract it to a local directory.

+
+
Parameters:
+
    +
  • local_directory (str) – The local directory path to extract the downloaded archive.

  • +
  • repo_id (str) – The identifier of the repository.

  • +
  • file_in_repo (str) – The file path within the repository.

  • +
  • repo_type (RepoTypeTyping) – The type of the repository (‘dataset’, ‘model’, ‘space’).

  • +
  • revision (str) – The revision of the repository (e.g., branch, tag, commit hash).

  • +
  • password (str, optional) – The password of the archive file.

  • +
  • hf_token (str, optional) – Huggingface token for API client, use HF_TOKEN variable if not assigned.

  • +
+
+
+
+ +
+
+

download_directory_as_directory

+
+
+hfutils.operate.download.download_directory_as_directory(local_directory: str, repo_id: str, dir_in_repo: str = '.', repo_type: ~typing.Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', silent: bool = False, ignore_patterns: ~typing.List[str] = <object object>, resume_download: bool = True, max_workers: int = 8, max_retries: int = 5, hf_token: str | None = None)[source]
+

Download all files in a directory from a Hugging Face repository to a local directory.

+
+
Parameters:
+
    +
  • local_directory (str) – The local directory path to save the downloaded files.

  • +
  • repo_id (str) – The identifier of the repository.

  • +
  • dir_in_repo (str) – The directory path within the repository.

  • +
  • repo_type (RepoTypeTyping) – The type of the repository (‘dataset’, ‘model’, ‘space’).

  • +
  • revision (str) – The revision of the repository (e.g., branch, tag, commit hash).

  • +
  • silent (bool) – If True, suppress progress bar output.

  • +
  • ignore_patterns (List[str]) – List of file patterns to ignore.

  • +
  • max_workers (int) – Max workers when downloading. Default is 8.

  • +
  • max_retries (int) – Max retry times when downloading. Default is 5.

  • +
  • resume_download (bool) – Resume the existing download.

  • +
  • hf_token (str, optional) – Huggingface token for API client, use HF_TOKEN variable if not assigned.

  • +
+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/operate/index.html b/dev/entry/api_doc/operate/index.html new file mode 100644 index 0000000000..94087277f3 --- /dev/null +++ b/dev/entry/api_doc/operate/index.html @@ -0,0 +1,237 @@ + + + + + + + hfutils.operate — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/operate/upload.html b/dev/entry/api_doc/operate/upload.html new file mode 100644 index 0000000000..1a2c3b62f8 --- /dev/null +++ b/dev/entry/api_doc/operate/upload.html @@ -0,0 +1,285 @@ + + + + + + + hfutils.operate.upload — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.operate.upload

+
+

upload_file_to_file

+
+
+hfutils.operate.upload.upload_file_to_file(local_file, repo_id: str, file_in_repo: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', message: str | None = None, hf_token: str | None = None)[source]
+

Upload a local file to a specified path in a Hugging Face repository.

+
+
Parameters:
+
    +
  • local_file (str) – The local file path to be uploaded.

  • +
  • repo_id (str) – The identifier of the repository.

  • +
  • file_in_repo (str) – The file path within the repository.

  • +
  • repo_type (RepoTypeTyping) – The type of the repository (‘dataset’, ‘model’, ‘space’).

  • +
  • revision (str) – The revision of the repository (e.g., branch, tag, commit hash).

  • +
  • message (Optional[str]) – The commit message for the upload.

  • +
  • hf_token (str, optional) – Huggingface token for API client, use HF_TOKEN variable if not assigned.

  • +
+
+
+
+ +
+
+

upload_directory_as_archive

+
+
+hfutils.operate.upload.upload_directory_as_archive(local_directory, repo_id: str, archive_in_repo: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', message: str | None = None, silent: bool = False, hf_token: str | None = None)[source]
+

Upload a local directory as an archive file to a specified path in a Hugging Face repository.

+
+
Parameters:
+
    +
  • local_directory (str) – The local directory path to be uploaded.

  • +
  • repo_id (str) – The identifier of the repository.

  • +
  • archive_in_repo (str) – The archive file path within the repository.

  • +
  • repo_type (RepoTypeTyping) – The type of the repository (‘dataset’, ‘model’, ‘space’).

  • +
  • revision (str) – The revision of the repository (e.g., branch, tag, commit hash).

  • +
  • message (Optional[str]) – The commit message for the upload.

  • +
  • silent (bool) – If True, suppress progress bar output.

  • +
  • hf_token (str, optional) – Huggingface token for API client, use HF_TOKEN variable if not assigned.

  • +
+
+
+
+ +
+
+

upload_directory_as_directory

+
+
+hfutils.operate.upload.upload_directory_as_directory(local_directory, repo_id: str, path_in_repo: str, repo_type: ~typing.Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', message: str | None = None, time_suffix: bool = True, clear: bool = False, ignore_patterns: ~typing.List[str] = <object object>, hf_token: str | None = None, operation_chunk_size: int | None = None, upload_timespan: float = 5.0)[source]
+

Upload a local directory and its files to a specified path in a Hugging Face repository.

+
+
Parameters:
+
    +
  • local_directory (str) – The local directory path to be uploaded.

  • +
  • repo_id (str) – The identifier of the repository.

  • +
  • path_in_repo (str) – The directory path within the repository.

  • +
  • repo_type (RepoTypeTyping) – The type of the repository (‘dataset’, ‘model’, ‘space’).

  • +
  • revision (str) – The revision of the repository (e.g., branch, tag, commit hash).

  • +
  • message (Optional[str]) – The commit message for the upload.

  • +
  • time_suffix (bool) – If True, append a timestamp to the commit message.

  • +
  • clear (bool) – If True, remove files in the repository not present in the local directory.

  • +
  • ignore_patterns (List[str]) – List of file patterns to ignore.

  • +
  • hf_token (str, optional) – Huggingface token for API client, use HF_TOKEN variable if not assigned.

  • +
  • operation_chunk_size (Optional[int]) – Chunk size of the operations. All the operations will be +seperated into multiple commits when this is set.

  • +
  • upload_timespan (float) – Upload minimal time interval when chunked uploading enabled.

  • +
+
+
+
+

Note

+

When operation_chunk_size is set, multiple commits will be created. When some commits failed, +it will roll back to the startup commit, using hfutils.repository.hf_hub_rollback() function..

+
+
+

Warning

+

When operation_chunk_size is set, multiple commits will be created. But HuggingFace’s repository +api cannot guarantee the atomic feature of your data. So this function is not thread-safe.

+
+
+

Note

+

The rate limit of HuggingFace repository commit creation is approximately 120 commits / hour. +So if you really have large number of chunks to create, please set the upload_timespan to a value +no less than 30.0 to make sure your uploading will not be rate-limited.

+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/operate/validate.html b/dev/entry/api_doc/operate/validate.html new file mode 100644 index 0000000000..2e9d2ef99d --- /dev/null +++ b/dev/entry/api_doc/operate/validate.html @@ -0,0 +1,215 @@ + + + + + + + hfutils.operate.validate — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.operate.validate

+
+

is_local_file_ready

+
+
+hfutils.operate.validate.is_local_file_ready(local_file: str, repo_id: str, file_in_repo: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', hf_token: str | None = None) bool[source]
+

Checks if the local file is ready by comparing it with the file on the Hugging Face Hub repository.

+
+
Parameters:
+
    +
  • local_file (str) – The path to the local file.

  • +
  • repo_id (str) – The identifier of the repository.

  • +
  • file_in_repo (str) – The path to the file in the repository.

  • +
  • repo_type (RepoTypeTyping) – The type of the repository. Default is ‘dataset’.

  • +
  • revision (str) – The revision of the repository. Default is ‘main’.

  • +
  • hf_token (Optional[str]) – The Hugging Face API token. Default is None.

  • +
+
+
Returns:
+

True if the local file matches the file on the repository, False otherwise.

+
+
Return type:
+

bool

+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/repository/base.html b/dev/entry/api_doc/repository/base.html new file mode 100644 index 0000000000..a347e45c44 --- /dev/null +++ b/dev/entry/api_doc/repository/base.html @@ -0,0 +1,229 @@ + + + + + + + hfutils.repository.base — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.repository.base

+

This module provides utility functions for working with Hugging Face Hub repositories and Git.

+

It includes functions to:

+
    +
  1. Generate Hugging Face Hub repository URLs.

  2. +
  3. Check Git and Git LFS installations.

  4. +
+

The module uses the git_info function from the hbutils.system package and constants from huggingface_hub.

+
+

hf_hub_repo_url

+
+
+hfutils.repository.base.hf_hub_repo_url(repo_id: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', endpoint: str | None = None) str[source]
+

Generate a Hugging Face Hub repository URL.

+
+
Parameters:
+
    +
  • repo_id (str) – The repository ID.

  • +
  • repo_type (RepoTypeTyping) – The type of repository. Can be ‘model’, ‘dataset’, or ‘space’. Defaults to ‘dataset’.

  • +
  • endpoint (Optional[str]) – The Hugging Face Hub endpoint. If None, uses the default ENDPOINT.

  • +
+
+
Returns:
+

The full URL for the specified Hugging Face Hub repository.

+
+
Return type:
+

str

+
+
Raises:
+

ValueError – If an unknown repository type is provided.

+
+
Usage:
+
>>> hf_hub_repo_url('username/repo', 'model')
+'https://huggingface.co/username/repo'
+>>> hf_hub_repo_url('username/dataset', 'dataset')
+'https://huggingface.co/datasets/username/dataset'
+
+
+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/repository/clone.html b/dev/entry/api_doc/repository/clone.html new file mode 100644 index 0000000000..78644e9214 --- /dev/null +++ b/dev/entry/api_doc/repository/clone.html @@ -0,0 +1,222 @@ + + + + + + + hfutils.repository.clone — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.repository.clone

+

This module provides functionality to clone Hugging Face Hub repositories using Git.

+

It includes a function to clone a repository from Hugging Face Hub to a local directory, +with options for authentication, repository type, revision, and other Git clone parameters.

+
+

hf_hub_clone

+
+
+hfutils.repository.clone.hf_hub_clone(repo_id: str, dst_dir: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', endpoint: str | None = None, hf_token: str | None = None, silent: bool = False, no_lfs: bool = False, max_depth: int | None = None)[source]
+

Clone a repository from Hugging Face Hub.

+
+
Parameters:
+
    +
  • repo_id (str) – The ID of the repository to clone.

  • +
  • dst_dir (str) – The local directory to clone the repository into.

  • +
  • repo_type (RepoTypeTyping) – The type of the repository (‘dataset’, ‘model’, or ‘space’). Defaults to ‘dataset’.

  • +
  • revision (str) – The specific revision to clone. Defaults to ‘main’.

  • +
  • endpoint (Optional[str]) – The Hugging Face Hub endpoint. If None, uses the default endpoint.

  • +
  • hf_token (Optional[str]) – The Hugging Face authentication token. If None, attempts to use stored credentials.

  • +
  • silent (bool) – If True, suppresses command output. Defaults to False.

  • +
  • no_lfs (bool) – If True, skips downloading of LFS files. Defaults to False.

  • +
  • max_depth (Optional[int]) – The maximum number of commits to fetch. If None, fetches all commits.

  • +
+
+
Raises:
+

subprocess.CalledProcessError – If the Git clone command fails.

+
+
Usage:
+
>>> hf_hub_clone('username/repo', '/path/to/local/dir', repo_type='model', revision='v1.0')
+
+
+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/repository/index.html b/dev/entry/api_doc/repository/index.html new file mode 100644 index 0000000000..ab432e4885 --- /dev/null +++ b/dev/entry/api_doc/repository/index.html @@ -0,0 +1,209 @@ + + + + + + + hfutils.repository — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.repository

+
+
Overview:

Some git-based operations.

+
+
+ +
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/repository/rollback.html b/dev/entry/api_doc/repository/rollback.html new file mode 100644 index 0000000000..5c323800af --- /dev/null +++ b/dev/entry/api_doc/repository/rollback.html @@ -0,0 +1,235 @@ + + + + + + + hfutils.repository.rollback — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.repository.rollback

+

This module provides functionality to rollback a Hugging Face Hub repository to a specific commit.

+

It includes a function to clone a repository, reset it to a specified commit, and force push the changes back to the remote repository.

+
+

hf_hub_rollback

+
+
+hfutils.repository.rollback.hf_hub_rollback(repo_id: str, rollback_to: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str = 'main', endpoint: str | None = None, hf_token: str | None = None, silent: bool = False)[source]
+

Rollback a Hugging Face Hub repository to a specific commit.

+

This function clones the repository, resets it to the specified commit, and force pushes the changes back to the remote.

+
+
Parameters:
+
    +
  • repo_id (str) – The ID of the repository to rollback.

  • +
  • rollback_to (str) – The commit hash or reference to rollback to.

  • +
  • repo_type (RepoTypeTyping) – The type of the repository (‘dataset’, ‘model’, or ‘space’). Defaults to ‘dataset’.

  • +
  • revision (str) – The branch or tag to clone. Defaults to ‘main’.

  • +
  • endpoint (Optional[str]) – The Hugging Face Hub endpoint. If None, uses the default endpoint.

  • +
  • hf_token (Optional[str]) – The Hugging Face authentication token. If None, attempts to use stored credentials.

  • +
  • silent (bool) – If True, suppresses command output. Defaults to False.

  • +
+
+
Raises:
+

subprocess.CalledProcessError – If any Git command fails during the process.

+
+
Usage:
+
>>> hf_hub_rollback('username/repo', 'abc123', repo_type='model')
+
+
+
+
+
+

Note

+

This function performs the following steps:

+
    +
  1. Checks for Git installation (without LFS requirement).

  2. +
  3. Creates a temporary directory for the operation.

  4. +
  5. Clones the specified repository into the temporary directory.

  6. +
  7. Resets the repository to the specified commit using ‘git reset –hard’.

  8. +
  9. Force pushes the changes back to the remote repository.

  10. +
+
+
+

Warning

+

This operation can overwrite remote history and can not be cancelled. Use with caution.

+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/utils/binary.html b/dev/entry/api_doc/utils/binary.html new file mode 100644 index 0000000000..9985c17337 --- /dev/null +++ b/dev/entry/api_doc/utils/binary.html @@ -0,0 +1,211 @@ + + + + + + + hfutils.utils.binary — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.utils.binary

+
+

is_binary_file

+
+
+hfutils.utils.binary.is_binary_file(file) bool[source]
+

Check if a given file is binary.

+

This function reads the first 1024 bytes of the file and checks if it contains any +non-text (binary) characters.

+
+
Parameters:
+

file (str) – The path to the file to be checked.

+
+
Returns:
+

True if the file is binary, False if it is a text file.

+
+
Return type:
+

bool

+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/utils/download.html b/dev/entry/api_doc/utils/download.html new file mode 100644 index 0000000000..55a2e0b96b --- /dev/null +++ b/dev/entry/api_doc/utils/download.html @@ -0,0 +1,220 @@ + + + + + + + hfutils.utils.download — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.utils.download

+
+

download_file

+
+
+hfutils.utils.download.download_file(url: str, filename: str, expected_size: int | None = None, desc: str | None = None, session: Session | None = None, silent: bool = False, **kwargs) str[source]
+

Download a file from the given URL and save it to the specified filename.

+

This function uses the requests library to download a file from the given URL +and provides a progress bar using tqdm. It also performs checks to ensure that +the downloaded file has the expected size.

+
+
Parameters:
+
    +
  • url (str) – The URL of the file to download.

  • +
  • filename (str) – The local path where the file should be saved.

  • +
  • expected_size (int, optional) – The expected size of the file in bytes (optional).

  • +
  • desc (str, optional) – Description for the tqdm progress bar (optional).

  • +
  • session (requests.Session, optional) – An optional requests.Session object to use for the download.

  • +
  • silent (bool) – If True, suppress tqdm output, otherwise display it.

  • +
  • kwargs – Additional keyword arguments to pass to requests.get().

  • +
+
+
Returns:
+

The path to the downloaded file.

+
+
Return type:
+

str

+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/utils/index.html b/dev/entry/api_doc/utils/index.html new file mode 100644 index 0000000000..01b4713753 --- /dev/null +++ b/dev/entry/api_doc/utils/index.html @@ -0,0 +1,233 @@ + + + + + + + hfutils.utils — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/utils/path.html b/dev/entry/api_doc/utils/path.html new file mode 100644 index 0000000000..93d4df1d32 --- /dev/null +++ b/dev/entry/api_doc/utils/path.html @@ -0,0 +1,288 @@ + + + + + + + hfutils.utils.path — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.utils.path

+
+

hf_normpath

+
+
+hfutils.utils.path.hf_normpath(path) str[source]
+

Normalize a given path.

+
+
Parameters:
+

path (Any) – The path to normalize.

+
+
Returns:
+

The normalized path.

+
+
Return type:
+

str

+
+
+
+ +
+
+

hf_fs_path

+
+
+hfutils.utils.path.hf_fs_path(repo_id: str, filename: str, repo_type: Literal['dataset', 'model', 'space'] = 'dataset', revision: str | None = None)[source]
+

Get the huggingface filesystem path.

+
+
Parameters:
+
    +
  • repo_id (str) – The repository ID.

  • +
  • filename (str) – The filename.

  • +
  • repo_type (RepoTypeTyping) – The type of repository. (default: ‘dataset’)

  • +
  • revision (Optional[str]) – The revision of the repository. (default: None)

  • +
+
+
Returns:
+

The huggingface filesystem path.

+
+
Return type:
+

str

+
+
+
+ +
+
+

parse_hf_fs_path

+
+
+hfutils.utils.path.parse_hf_fs_path(path: str) HfFileSystemPath[source]
+

Parse the huggingface filesystem path.

+
+
Parameters:
+

path (str) – The path to parse.

+
+
Returns:
+

The parsed huggingface filesystem path.

+
+
Return type:
+

HfFileSystemPath

+
+
Raises:
+

ValueError – If this path is invalid.

+
+
+
+ +
+
+

HfFileSystemPath

+
+
+class hfutils.utils.path.HfFileSystemPath(repo_id: str, filename: str, repo_type: Literal['dataset', 'model', 'space'], revision: str | None)[source]
+

Huggingface FileSystem Path.

+
+
Parameters:
+
    +
  • repo_id (str) – The repository ID.

  • +
  • filename (str) – The filename.

  • +
  • repo_type (RepoTypeTyping) – The type of repository.

  • +
  • revision (Optional[str]) – The revision of the repository.

  • +
+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/utils/tqdm_.html b/dev/entry/api_doc/utils/tqdm_.html new file mode 100644 index 0000000000..f95d02f718 --- /dev/null +++ b/dev/entry/api_doc/utils/tqdm_.html @@ -0,0 +1,214 @@ + + + + + + + hfutils.utils.tqdm — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.utils.tqdm

+
+

tqdm

+
+
+hfutils.utils.tqdm_.tqdm(*args, silent: bool = False, **kwargs)[source]
+

An enhanced version of tqdm (progress bar) with an option to silence the output.

+

This function modifies the behavior of tqdm to allow silencing the progress bar.

+
+
Parameters:
+
    +
  • args – Positional arguments to be passed to tqdm.

  • +
  • silent (bool) – If True, the progress bar content will not be displayed.

  • +
  • kwargs – Additional keyword arguments to be passed to tqdm.

  • +
+
+
Returns:
+

tqdm progress bar.

+
+
Return type:
+

tqdm.std.tqdm

+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/api_doc/utils/walk.html b/dev/entry/api_doc/utils/walk.html new file mode 100644 index 0000000000..291b707058 --- /dev/null +++ b/dev/entry/api_doc/utils/walk.html @@ -0,0 +1,207 @@ + + + + + + + hfutils.utils.walk — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

hfutils.utils.walk

+
+

walk_files

+
+
+hfutils.utils.walk.walk_files(directory: str) Iterator[str][source]
+

Recursively walk through a directory and yield relative paths of all files.

+
+
Parameters:
+

directory (str) – The root directory to start walking.

+
+
Returns:
+

An iterator that yields relative paths of all files in the directory.

+
+
Return type:
+

Iterator[str]

+
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/genindex.html b/dev/entry/genindex.html new file mode 100644 index 0000000000..34e96ad3bb --- /dev/null +++ b/dev/entry/genindex.html @@ -0,0 +1,814 @@ + + + + + + Index — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Index

+ +
+ _ + | A + | C + | D + | E + | F + | G + | H + | I + | K + | L + | M + | N + | P + | R + | S + | T + | U + | W + +
+

_

+ + + +
+ +

A

+ + + +
+ +

C

+ + + +
+ +

D

+ + + +
+ +

E

+ + +
+ +

F

+ + + +
+ +

G

+ + + +
+ +

H

+ + + +
    +
  • + hfutils.entry.rollback + +
  • +
  • + hfutils.entry.upload + +
  • +
  • + hfutils.entry.whoami + +
  • +
  • + hfutils.index + +
  • +
  • + hfutils.index.fetch + +
  • +
  • + hfutils.index.make + +
  • +
  • + hfutils.index.validate + +
  • +
  • + hfutils.operate + +
  • +
  • + hfutils.operate.base + +
  • +
  • + hfutils.operate.download + +
  • +
  • + hfutils.operate.upload + +
  • +
  • + hfutils.operate.validate + +
  • +
  • + hfutils.repository + +
  • +
  • + hfutils.repository.base + +
  • +
  • + hfutils.repository.clone + +
  • +
  • + hfutils.repository.rollback + +
  • +
  • + hfutils.utils + +
  • +
  • + hfutils.utils.binary + +
  • +
  • + hfutils.utils.download + +
  • +
  • + hfutils.utils.path + +
  • +
  • + hfutils.utils.tqdm_ + +
  • +
  • + hfutils.utils.walk + +
  • +
+ +

I

+ + + +
+ +

K

+ + +
+ +

L

+ + + +
+ +

M

+ + +
+ +

N

+ + + +
+ +

P

+ + + +
+ +

R

+ + +
+ +

S

+ + +
+ +

T

+ + + +
+ +

U

+ + + +
+ +

W

+ + +
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/index.html b/dev/entry/index.html new file mode 100644 index 0000000000..5053ca7181 --- /dev/null +++ b/dev/entry/index.html @@ -0,0 +1,256 @@ + + + + + + + Welcome to hfutils’s Documentation — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/information/environment.html b/dev/entry/information/environment.html new file mode 100644 index 0000000000..ee89441aa6 --- /dev/null +++ b/dev/entry/information/environment.html @@ -0,0 +1,211 @@ + + + + + + + Run Environment Information — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

Run Environment Information

+

Here is the information from the running environment.

+
+
[1]:
+
+
+
import os
+import platform
+import shutil
+
+import cpuinfo
+import psutil
+from hbutils.scale import size_to_bytes_str
+
+print('OS:', platform.platform())
+print('Python:', platform.python_implementation(), platform.python_version())
+print('CPU Brand:', cpuinfo.get_cpu_info()["brand_raw"])
+print('CPU Count:', os.cpu_count())
+print('CPU Freq:', psutil.cpu_freq().current, 'MHz')
+print('Memory Size:', size_to_bytes_str(psutil.virtual_memory().total, precision=3))
+print('Has CUDA:', 'Yes' if shutil.which('nvidia-smi') else 'No')
+
+
+
+
+
+
+
+
+OS: Linux-6.5.0-1023-azure-x86_64-with-glibc2.34
+Python: CPython 3.8.18
+CPU Brand: AMD EPYC 7763 64-Core Processor
+CPU Count: 4
+CPU Freq: 2923.05675 MHz
+Memory Size: 15.606 GiB
+Has CUDA: No
+
+
+

Please note that, this information in deployed documentation is automatically executed on Github Action. Therefore, some performance data may be different with your local environment

+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/information/environment.ipynb b/dev/entry/information/environment.ipynb new file mode 100644 index 0000000000..53e3b5dd01 --- /dev/null +++ b/dev/entry/information/environment.ipynb @@ -0,0 +1,114 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "# Run Environment Information" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "Here is the information from the running environment." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "execution": { + "iopub.execute_input": "2024-07-21T07:52:12.758855Z", + "iopub.status.busy": "2024-07-21T07:52:12.758278Z", + "iopub.status.idle": "2024-07-21T07:52:13.926335Z", + "shell.execute_reply": "2024-07-21T07:52:13.925667Z" + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "OS: Linux-6.5.0-1023-azure-x86_64-with-glibc2.34\n", + "Python: CPython 3.8.18\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "CPU Brand: AMD EPYC 7763 64-Core Processor\n", + "CPU Count: 4\n", + "CPU Freq: 2923.05675 MHz\n", + "Memory Size: 15.606 GiB\n", + "Has CUDA: No\n" + ] + } + ], + "source": [ + "import os\n", + "import platform\n", + "import shutil\n", + "\n", + "import cpuinfo\n", + "import psutil\n", + "from hbutils.scale import size_to_bytes_str\n", + "\n", + "print('OS:', platform.platform())\n", + "print('Python:', platform.python_implementation(), platform.python_version())\n", + "print('CPU Brand:', cpuinfo.get_cpu_info()[\"brand_raw\"])\n", + "print('CPU Count:', os.cpu_count())\n", + "print('CPU Freq:', psutil.cpu_freq().current, 'MHz')\n", + "print('Memory Size:', size_to_bytes_str(psutil.virtual_memory().total, precision=3))\n", + "print('Has CUDA:', 'Yes' if shutil.which('nvidia-smi') else 'No')" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "Please note that, this information in deployed documentation is automatically executed on Github Action. Therefore, some performance data may be different with your local environment" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.18" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/dev/entry/information/environment.result.html b/dev/entry/information/environment.result.html new file mode 100644 index 0000000000..5b50daf20d --- /dev/null +++ b/dev/entry/information/environment.result.html @@ -0,0 +1,216 @@ + + + + + + + Run Environment Information — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

Run Environment Information

+

Here is the information from the running environment.

+
+
[1]:
+
+
+
import os
+import platform
+import shutil
+
+import cpuinfo
+import psutil
+from hbutils.scale import size_to_bytes_str
+
+print('OS:', platform.platform())
+print('Python:', platform.python_implementation(), platform.python_version())
+print('CPU Brand:', cpuinfo.get_cpu_info()["brand_raw"])
+print('CPU Count:', os.cpu_count())
+print('CPU Freq:', psutil.cpu_freq().current, 'MHz')
+print('Memory Size:', size_to_bytes_str(psutil.virtual_memory().total, precision=3))
+print('Has CUDA:', 'Yes' if shutil.which('nvidia-smi') else 'No')
+
+
+
+
+
+
+
+
+OS: Linux-6.5.0-1023-azure-x86_64-with-glibc2.34
+Python: CPython 3.8.18
+CPU Brand: AMD EPYC 7763 64-Core Processor
+CPU Count: 4
+CPU Freq: 2976.9235 MHz
+Memory Size: 15.606 GiB
+Has CUDA: No
+
+
+

Please note that, this information in deployed documentation is automatically executed on Github Action. Therefore, some performance data may be different with your local environment

+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/information/environment.result.ipynb b/dev/entry/information/environment.result.ipynb new file mode 100644 index 0000000000..90263a1368 --- /dev/null +++ b/dev/entry/information/environment.result.ipynb @@ -0,0 +1,114 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "# Run Environment Information" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "Here is the information from the running environment." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "execution": { + "iopub.execute_input": "2024-07-21T07:22:54.938901Z", + "iopub.status.busy": "2024-07-21T07:22:54.938694Z", + "iopub.status.idle": "2024-07-21T07:22:56.111878Z", + "shell.execute_reply": "2024-07-21T07:22:56.111130Z" + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "OS: Linux-6.5.0-1023-azure-x86_64-with-glibc2.34\n", + "Python: CPython 3.8.18\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "CPU Brand: AMD EPYC 7763 64-Core Processor\n", + "CPU Count: 4\n", + "CPU Freq: 2976.9235 MHz\n", + "Memory Size: 15.606 GiB\n", + "Has CUDA: No\n" + ] + } + ], + "source": [ + "import os\n", + "import platform\n", + "import shutil\n", + "\n", + "import cpuinfo\n", + "import psutil\n", + "from hbutils.scale import size_to_bytes_str\n", + "\n", + "print('OS:', platform.platform())\n", + "print('Python:', platform.python_implementation(), platform.python_version())\n", + "print('CPU Brand:', cpuinfo.get_cpu_info()[\"brand_raw\"])\n", + "print('CPU Count:', os.cpu_count())\n", + "print('CPU Freq:', psutil.cpu_freq().current, 'MHz')\n", + "print('Memory Size:', size_to_bytes_str(psutil.virtual_memory().total, precision=3))\n", + "print('Has CUDA:', 'Yes' if shutil.which('nvidia-smi') else 'No')" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + }, + "source": [ + "Please note that, this information in deployed documentation is automatically executed on Github Action. Therefore, some performance data may be different with your local environment" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.18" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/dev/entry/objects.inv b/dev/entry/objects.inv new file mode 100644 index 0000000000..80ee7b19e9 Binary files /dev/null and b/dev/entry/objects.inv differ diff --git a/dev/entry/py-modindex.html b/dev/entry/py-modindex.html new file mode 100644 index 0000000000..8166523b70 --- /dev/null +++ b/dev/entry/py-modindex.html @@ -0,0 +1,363 @@ + + + + + + Python Module Index — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Python Module Index

+ +
+ h +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ h
+ hfutils +
    + hfutils.archive +
    + hfutils.cache +
    + hfutils.cache.delete +
    + hfutils.config +
    + hfutils.config.meta +
    + hfutils.entry +
    + hfutils.entry.base +
    + hfutils.entry.cli +
    + hfutils.entry.clone +
    + hfutils.entry.dispatch +
    + hfutils.entry.download +
    + hfutils.entry.index +
    + hfutils.entry.ls +
    + hfutils.entry.ls_repo +
    + hfutils.entry.rollback +
    + hfutils.entry.upload +
    + hfutils.entry.whoami +
    + hfutils.index +
    + hfutils.index.fetch +
    + hfutils.index.make +
    + hfutils.index.validate +
    + hfutils.operate +
    + hfutils.operate.base +
    + hfutils.operate.download +
    + hfutils.operate.upload +
    + hfutils.operate.validate +
    + hfutils.repository +
    + hfutils.repository.base +
    + hfutils.repository.clone +
    + hfutils.repository.rollback +
    + hfutils.utils +
    + hfutils.utils.binary +
    + hfutils.utils.download +
    + hfutils.utils.path +
    + hfutils.utils.tqdm_ +
    + hfutils.utils.walk +
+ + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/search.html b/dev/entry/search.html new file mode 100644 index 0000000000..31134cd92c --- /dev/null +++ b/dev/entry/search.html @@ -0,0 +1,183 @@ + + + + + + Search — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + + + +
+ +
+ +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/dev/entry/searchindex.js b/dev/entry/searchindex.js new file mode 100644 index 0000000000..8ff8485d94 --- /dev/null +++ b/dev/entry/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"docnames": ["api_doc/archive/index", "api_doc/cache/delete", "api_doc/cache/index", "api_doc/config/index", "api_doc/config/meta", "api_doc/entry/base", "api_doc/entry/cli", "api_doc/entry/clone", "api_doc/entry/dispatch", "api_doc/entry/download", "api_doc/entry/index", "api_doc/entry/index_", "api_doc/entry/ls", "api_doc/entry/ls_repo", "api_doc/entry/rollback", "api_doc/entry/upload", "api_doc/entry/whoami", "api_doc/index/fetch", "api_doc/index/index", "api_doc/index/make", "api_doc/index/validate", "api_doc/operate/base", "api_doc/operate/download", "api_doc/operate/index", "api_doc/operate/upload", "api_doc/operate/validate", "api_doc/repository/base", "api_doc/repository/clone", "api_doc/repository/index", "api_doc/repository/rollback", "api_doc/utils/binary", "api_doc/utils/download", "api_doc/utils/index", "api_doc/utils/path", "api_doc/utils/tqdm_", "api_doc/utils/walk", "index", "information/environment", "information/environment.result", "tutorials/installation/index", "tutorials/quick_start/index"], "filenames": ["api_doc/archive/index.rst", "api_doc/cache/delete.rst", "api_doc/cache/index.rst", "api_doc/config/index.rst", "api_doc/config/meta.rst", "api_doc/entry/base.rst", "api_doc/entry/cli.rst", "api_doc/entry/clone.rst", "api_doc/entry/dispatch.rst", "api_doc/entry/download.rst", "api_doc/entry/index.rst", "api_doc/entry/index_.rst", "api_doc/entry/ls.rst", "api_doc/entry/ls_repo.rst", "api_doc/entry/rollback.rst", "api_doc/entry/upload.rst", "api_doc/entry/whoami.rst", "api_doc/index/fetch.rst", "api_doc/index/index.rst", "api_doc/index/make.rst", "api_doc/index/validate.rst", "api_doc/operate/base.rst", "api_doc/operate/download.rst", "api_doc/operate/index.rst", "api_doc/operate/upload.rst", "api_doc/operate/validate.rst", "api_doc/repository/base.rst", "api_doc/repository/clone.rst", "api_doc/repository/index.rst", "api_doc/repository/rollback.rst", "api_doc/utils/binary.rst", "api_doc/utils/download.rst", "api_doc/utils/index.rst", "api_doc/utils/path.rst", "api_doc/utils/tqdm_.rst", "api_doc/utils/walk.rst", "index.rst", "information/environment.ipynb", "information/environment.result.ipynb", "tutorials/installation/index.rst", "tutorials/quick_start/index.rst"], "titles": ["hfutils.archive", "hfutils.cache.delete", "hfutils.cache", "hfutils.config", "hfutils.config.meta", "hfutils.entry.base", "hfutils.entry.cli", "hfutils.entry.clone", "hfutils.entry.dispatch", "hfutils.entry.download", "hfutils.entry", "hfutils.entry.index", "hfutils.entry.ls", "hfutils.entry.ls_repo", "hfutils.entry.rollback", "hfutils.entry.upload", "hfutils.entry.whoami", "hfutils.index.fetch", "hfutils.index", "hfutils.index.make", "hfutils.index.validate", "hfutils.operate.base", "hfutils.operate.download", "hfutils.operate", "hfutils.operate.upload", "hfutils.operate.validate", "hfutils.repository.base", "hfutils.repository.clone", "hfutils.repository", "hfutils.repository.rollback", "hfutils.utils.binary", "hfutils.utils.download", "hfutils.utils", "hfutils.utils.path", "hfutils.utils.tqdm", "hfutils.utils.walk", "Welcome to hfutils\u2019s Documentation", "Run Environment Information", "Run Environment Information", "Installation", "Quick Start"], "terms": {"overview": [0, 2, 4, 28], "pack": 0, "unpack": 0, "manag": [0, 2, 11], "support": 0, "format": 0, "extens": 0, "name": [0, 5], "7z": 0, "bztar": 0, "tar": [0, 11, 17, 19, 20], "bz2": 0, "tbz2": 0, "gztar": 0, "gz": 0, "tgz": 0, "rar": 0, "xztar": 0, "xz": 0, "txz": 0, "zip": 0, "If": [0, 1, 5, 20, 22, 24, 26, 27, 29, 31, 33, 34], "you": [0, 17, 24, 39], "requir": [0, 29, 39], "simpli": [0, 39], "instal": [0, 26, 29, 36], "us": [0, 1, 5, 11, 17, 19, 20, 21, 22, 24, 26, 27, 29, 31, 36, 39], "follow": [0, 12, 29, 39], "code": [0, 5, 9, 15], "pip": [0, 39], "The": [0, 1, 5, 9, 11, 12, 15, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 30, 31, 33, 35, 39], "creation": [0, 24], "file": [0, 5, 9, 11, 12, 15, 17, 19, 20, 21, 22, 24, 25, 27, 30, 31, 35], "i": [0, 1, 9, 13, 15, 17, 19, 20, 22, 24, 25, 26, 30, 33, 36, 37, 38, 39], "we": 0, "util": [0, 26, 36, 39], "rarfil": 0, "librari": [0, 31], "which": [0, 17, 37, 38, 39], "doe": [0, 17], "offer": 0, "function": [0, 5, 11, 17, 19, 20, 24, 26, 27, 29, 30, 31, 34], "creat": [0, 11, 19, 24, 29], "str": [0, 1, 5, 9, 12, 13, 15, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 30, 31, 33, 35], "ext": 0, "list": [0, 5, 12, 17, 21, 22, 24], "fn_pack": 0, "callabl": [0, 5], "fn_unpack": 0, "sourc": [0, 1, 5, 8, 9, 12, 13, 15, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 30, 31, 33, 34, 35], "regist": 0, "custom": [0, 5, 9, 15], "type": [0, 1, 5, 12, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 30, 31, 33, 34, 35], "associ": 0, "paramet": [0, 1, 5, 8, 9, 12, 15, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 30, 31, 33, 34, 35], "A": [0, 21], "take": 0, "directori": [0, 1, 12, 19, 20, 22, 24, 27, 29, 35], "an": [0, 11, 17, 19, 20, 22, 24, 26, 31, 34, 35], "filenam": [0, 31, 33], "input": 0, "extract": [0, 22], "type_nam": 0, "archive_fil": 0, "silent": [0, 19, 22, 24, 27, 29, 31, 34], "bool": [0, 8, 17, 19, 20, 22, 24, 25, 27, 29, 30, 31, 34], "fals": [0, 17, 19, 20, 22, 24, 25, 27, 29, 30, 31, 34], "clear": [0, 24], "specifi": [0, 1, 11, 20, 24, 26, 29, 31], "result": 0, "true": [0, 17, 19, 20, 22, 24, 25, 27, 29, 30, 31, 34], "suppress": [0, 19, 22, 24, 27, 29, 31], "warn": [0, 5], "dure": [0, 29], "process": [0, 11, 29], "remov": [0, 24], "exist": [0, 17, 22], "when": [0, 13, 17, 19, 22, 24], "return": [0, 5, 17, 19, 20, 21, 25, 26, 30, 31, 33, 34, 35], "path": [0, 9, 15, 17, 19, 20, 21, 22, 24, 25, 27, 30, 31, 32, 35, 36], "password": [0, 22], "none": [0, 1, 5, 8, 9, 15, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 31, 33], "content": [0, 34], "option": [0, 1, 5, 8, 9, 15, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 31, 33, 34], "determin": 0, "base": [0, 10, 12, 20, 23, 28, 36], "rais": [0, 13, 17, 20, 26, 27, 29, 33], "valueerror": [0, 26, 33], "ani": [0, 1, 8, 29, 30, 33], "get": [0, 17, 19, 21, 31, 33], "repo_id": [1, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 33], "repo_typ": [1, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 33], "cache_dir": 1, "all": [1, 17, 22, 24, 27, 35], "detach": 1, "revis": [1, 17, 19, 20, 21, 22, 24, 25, 27, 29, 33], "from": [1, 5, 17, 19, 20, 21, 22, 26, 27, 31, 37, 38, 39], "match": [1, 17, 20, 25], "repositori": [1, 9, 11, 15, 17, 19, 20, 21, 22, 24, 25, 33, 36], "id": [1, 20, 26, 27, 29, 33], "where": [1, 20, 31], "store": [1, 11, 20, 27, 29], "default": [1, 19, 20, 22, 25, 26, 27, 29, 33], "huggingfac": [2, 20, 21, 22, 24, 26, 33, 36, 39], "local": [2, 13, 17, 19, 22, 24, 25, 27, 31, 37, 38], "can": [2, 17, 20, 26, 29, 39], "quickli": 2, "make": [2, 18, 20, 24, 36], "disk": 2, "space": [2, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 33], "under": [2, 39], "control": 2, "delet": [2, 36], "delete_detached_cach": 2, "delete_cach": 2, "meta": [3, 17, 36, 39], "__title__": [3, 39], "__version__": [3, 39], "__description__": [3, 39], "__author__": [3, 39], "__author_email__": 3, "inform": [4, 5, 8, 17, 19, 20], "packag": [4, 26], "titl": 4, "thi": [4, 5, 9, 11, 15, 17, 19, 20, 24, 26, 27, 29, 30, 31, 33, 34, 37, 38], "project": 4, "should": [4, 31, 39], "version": [4, 8, 34, 39], "short": 4, "descript": [4, 31], "includ": [4, 5, 11, 17, 19, 26, 27, 29], "setup": 4, "py": 4, "author": 4, "email": 4, "help_option_nam": 5, "h": 5, "help": 5, "dict": [5, 17, 19], "new": 5, "empti": 5, "dictionari": [5, 17], "map": 5, "initi": 5, "object": [5, 12, 17, 21, 22, 24, 31], "": [5, 8, 17, 24], "kei": [5, 17], "valu": [5, 8, 12, 19, 24], "pair": 5, "iter": [5, 35], "via": 5, "d": 5, "k": 5, "v": 5, "kwarg": [5, 8, 31, 34], "keyword": [5, 31, 34], "argument": [5, 17, 31, 34], "For": 5, "exampl": [5, 17], "one": 5, "1": [5, 12, 19, 20, 37, 38], "two": 5, "2": [5, 12, 39], "class": [5, 9, 12, 13, 15, 17, 33], "messag": [5, 9, 13, 15, 19, 24], "except": [5, 9, 13, 15, 17], "displai": [5, 9, 15, 31, 34], "yellow": 5, "color": 5, "error": [5, 9, 15], "exit_cod": [5, 9, 15], "exit": [5, 9, 15], "show": [5, 9, 15], "io": [5, 9, 15, 39], "write": [5, 9, 15], "output": [5, 9, 15, 22, 24, 27, 29, 31, 34, 39], "red": [5, 9, 15], "err": 5, "baseexcept": 5, "print": [5, 8, 37, 38, 39], "traceback": 5, "provid": [5, 11, 26, 27, 29, 31], "built": 5, "msg": 5, "handl": 5, "keyboard": 5, "interrupt": 5, "__init__": 5, "7": 5, "decor": 5, "wrap": 5, "click": [5, 8, 11], "command": [5, 27, 29, 39], "catch": 5, "consist": 5, "group": 6, "hfutilcli": [6, 10], "ctx": 8, "context": 8, "param": 8, "cli": [8, 10, 11, 36], "current": [8, 37, 38, 39], "metadata": 8, "arg": [8, 34], "indic": [9, 15], "remot": [9, 15, 29], "assign": [9, 15, 17, 21, 22, 24], "17": 9, "context_set": 10, "clickwarningexcept": 10, "clickerrorexcept": 10, "print_except": 10, "keyboardinterrupt": 10, "command_wrap": 10, "clone": [10, 28, 29, 36], "dispatch": [10, 36], "print_vers": 10, "download": [10, 17, 20, 23, 27, 32, 36], "noremotepathassignedwithdownload": 10, "index": [10, 36, 39], "l": [10, 36], "listitemtyp": 10, "listitem": 10, "ls_repo": [10, 36], "nolocalauthent": 10, "upload": [10, 11, 19, 23, 36], "noremotepathassignedwithupload": 10, "whoami": [10, 36], "rollback": [10, 28, 36], "modul": [11, 26, 27, 29, 36], "archiv": [11, 12, 17, 19, 20, 22, 24, 36], "hug": [11, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29], "face": [11, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29], "main": [11, 17, 19, 20, 21, 22, 24, 25, 27, 29, 39], "featur": [11, 24], "ad": 11, "subcommand": 11, "applic": 11, "minimum": 11, "interv": [11, 24], "between": 11, "system": [11, 21, 26], "client": [11, 21, 22, 24], "interact": 11, "enum": 12, "repres": [12, 17], "differ": [12, 17, 37, 38], "item": [12, 20], "valid": [12, 18, 23, 36], "ar": [12, 17], "folder": 12, "imag": [12, 17], "3": [12, 37, 38, 39], "4": [12, 37, 38], "model": [12, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 33], "5": [12, 22, 24, 37, 38], "data": [12, 17, 24, 37, 38], "6": [12, 37, 38], "repofold": 12, "repofil": [12, 20], "base_dir": 12, "union": [12, 17], "authent": [13, 20, 27, 29], "token": [13, 17, 19, 20, 21, 22, 24, 25, 27, 29], "33": 15, "standalon": 17, "incomplet": 17, "hash": [17, 19, 20, 21, 22, 24, 29], "archive_in_repo": [17, 19, 20, 24], "liter": [17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 33], "dataset": [17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 33], "idx_repo_id": [17, 19, 20], "idx_file_in_repo": [17, 19, 20], "idx_repo_typ": [17, 19, 20], "idx_revis": [17, 19, 20], "hf_token": [17, 19, 20, 21, 22, 24, 25, 27, 29], "identifi": [17, 19, 21, 22, 24, 25], "repotypetyp": [17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 33], "access": [17, 19], "import": [17, 37, 38, 39], "idx": 17, "deepgh": [17, 39], "danbooru_newest": 17, "0000": 17, "dict_kei": 17, "files": 17, "hash_lf": [17, 20], "7507000": 17, "jpg": 17, "7506000": 17, "7505000": 17, "besid": 17, "also": [17, 31, 39], "explicitli": 17, "nyanko7": 17, "danbooru2023": 17, "danbooru2023_index": 17, "origin": 17, "1000": 17, "png": 17, "10000": 17, "100000": 17, "insid": 17, "file_in_arch": 17, "check": [17, 20, 25, 26, 29, 30, 31, 39], "otherwis": [17, 20, 25, 31], "17506000": 17, "10000000001000": 17, "int": [17, 19, 20, 22, 24, 27, 31], "size": [17, 19, 20, 24, 31, 37, 38], "integ": 17, "filenotfounderror": 17, "435671": 17, "11966": 17, "detail": 17, "offset": 17, "sha256": 17, "265728": 17, "ef6a4e031fdffb705c8ce2c64e8cb8d993f431a887d7c1c0b1e6fa56e6107fcd": 17, "1024": [17, 30], "478d3313860519372f6a75ede287d4a7c18a2d851bbc79b3dd65caff4c716858": 17, "local_fil": [17, 22, 24, 25], "proxi": 17, "user_ag": 17, "header": 17, "endpoint": [17, 26, 27, 29], "save": [17, 19, 22, 31], "http": [17, 26, 39], "request": [17, 31], "user": 17, "agent": 17, "addit": [17, 31, 34], "api": [17, 20, 21, 22, 24, 25], "test_exampl": 17, "destin": 17, "given": [17, 21, 30, 31, 33], "fetch": [18, 27, 36], "archivestandalonefileincompletedownload": 18, "archivestandalonefilehashnotmatch": 18, "hf_tar_get_index": 18, "hf_tar_list_fil": 18, "hf_tar_file_exist": 18, "hf_tar_file_s": 18, "hf_tar_file_info": 18, "hf_tar_file_download": 18, "tar_create_index": 18, "hf_tar_create_index": [18, 20], "tar_get_index_info": 18, "hf_tar_create_from_directori": 18, "hf_tar_item_valid": 18, "hf_tar_valid": 18, "src_tar_fil": 19, "dst_index_fil": 19, "chunk_for_hash": 19, "1048576": 19, "with_hash": 19, "chunk": [19, 24], "20": 19, "mb": 19, "whether": 19, "progress": [19, 22, 24, 31, 34], "bar": [19, 22, 24, 31, 34], "log": 19, "skip_when_sync": 19, "skip": [19, 27], "sync": 19, "readi": [19, 25], "directli": 19, "json": [19, 20], "local_directori": [19, 22, 24], "file_item": 20, "hash_": 20, "expect": [20, 31], "sha": 20, "256": 20, "lf": [20, 26, 27, 29], "entrynotfounderror": 20, "entri": [20, 36], "found": 20, "isadirectoryerror": 20, "mean": [20, 39], "expir": 20, "need": 20, "re": 20, "gener": [20, 26], "so": [20, 24], "togeth": 20, "gracefulli": 20, "refresh": 20, "hfapi": 21, "variabl": [21, 22, 24], "hffilesystem": 21, "subdir": 21, "ignore_pattern": [21, 22, 24], "subdirectori": 21, "e": [21, 22, 24], "g": [21, 22, 24], "branch": [21, 22, 24, 29], "tag": [21, 22, 24, 29], "commit": [21, 22, 24, 27, 29], "pattern": [21, 22, 24], "ignor": [21, 22, 24], "file_in_repo": [22, 24, 25], "resume_download": 22, "within": [22, 24], "resum": 22, "dir_in_repo": 22, "max_work": 22, "8": [22, 37, 38, 39], "max_retri": 22, "max": 22, "worker": 22, "retri": 22, "time": [22, 24], "get_hf_client": 23, "get_hf_f": 23, "list_files_in_repositori": 23, "download_file_to_fil": 23, "download_archive_as_directori": 23, "download_directory_as_directori": 23, "upload_file_to_fil": 23, "upload_directory_as_arch": 23, "upload_directory_as_directori": 23, "is_local_file_readi": 23, "path_in_repo": 24, "time_suffix": 24, "operation_chunk_s": 24, "upload_timespan": 24, "float": 24, "0": [24, 27, 37, 38, 39], "its": 24, "append": 24, "timestamp": 24, "present": 24, "seper": 24, "multipl": 24, "set": 24, "minim": 24, "enabl": 24, "some": [24, 28, 37, 38], "fail": [24, 27, 29], "roll": 24, "back": [24, 29], "startup": 24, "hf_hub_rollback": [24, 28], "But": 24, "cannot": 24, "guarante": 24, "atom": 24, "your": [24, 37, 38, 39], "thread": 24, "safe": 24, "rate": 24, "limit": 24, "approxim": 24, "120": 24, "hour": 24, "realli": 24, "have": 24, "larg": 24, "number": [24, 27], "pleas": [24, 37, 38], "less": 24, "than": 24, "30": 24, "sure": 24, "compar": 25, "hub": [25, 26, 27, 29], "work": 26, "git": [26, 27, 28, 29, 39], "It": [26, 27, 29, 31, 39], "url": [26, 31], "git_info": 26, "hbutil": [26, 37, 38], "constant": 26, "huggingface_hub": 26, "full": 26, "unknown": 26, "usag": [26, 27, 29], "usernam": [26, 27, 29], "repo": [26, 27, 29], "co": 26, "other": 27, "dst_dir": 27, "no_lf": 27, "max_depth": 27, "specif": [27, 29], "attempt": [27, 29], "credenti": [27, 29], "maximum": 27, "subprocess": [27, 29], "calledprocesserror": [27, 29], "dir": 27, "v1": 27, "oper": [28, 29, 36], "hf_hub_repo_url": 28, "hf_hub_clon": 28, "reset": 29, "forc": 29, "push": 29, "chang": 29, "rollback_to": 29, "refer": 29, "abc123": 29, "perform": [29, 31, 37, 38], "step": 29, "without": 29, "temporari": 29, "hard": 29, "overwrit": 29, "histori": 29, "cancel": 29, "caution": 29, "read": 30, "first": 30, "byte": [30, 31], "contain": 30, "non": 30, "text": 30, "charact": 30, "expected_s": 31, "desc": 31, "session": 31, "tqdm": [31, 32, 36], "ensur": 31, "ha": [31, 37, 38], "pass": [31, 34], "binari": [32, 36], "is_binary_fil": 32, "download_fil": 32, "hf_normpath": 32, "hf_fs_path": 32, "parse_hf_fs_path": 32, "hffilesystempath": 32, "walk": [32, 36], "walk_fil": 32, "normal": 33, "filesystem": 33, "pars": 33, "invalid": 33, "tqdm_": 34, "enhanc": 34, "silenc": 34, "modifi": 34, "behavior": 34, "allow": 34, "posit": 34, "std": 34, "recurs": 35, "through": [35, 39], "yield": 35, "rel": 35, "root": 35, "start": [35, 36], "quick": 36, "run": 36, "environ": 36, "register_archive_typ": 36, "archive_pack": 36, "archive_unpack": 36, "get_archive_typ": 36, "get_archive_extnam": 36, "cach": 36, "config": [36, 39], "here": [37, 38], "o": [37, 38], "platform": [37, 38], "shutil": [37, 38], "cpuinfo": [37, 38], "psutil": [37, 38], "scale": [37, 38], "size_to_bytes_str": [37, 38], "python": [37, 38, 39], "python_implement": [37, 38], "python_vers": [37, 38], "cpu": [37, 38], "brand": [37, 38], "get_cpu_info": [37, 38], "brand_raw": [37, 38], "count": [37, 38], "cpu_count": [37, 38], "freq": [37, 38], "cpu_freq": [37, 38], "mhz": [37, 38], "memori": [37, 38], "virtual_memori": [37, 38], "total": [37, 38], "precis": [37, 38], "cuda": [37, 38], "ye": [37, 38], "nvidia": [37, 38], "smi": [37, 38], "els": [37, 38], "No": [37, 38], "linux": [37, 38], "1023": [37, 38], "azur": [37, 38], "x86_64": [37, 38], "glibc2": [37, 38], "34": [37, 38], "cpython": [37, 38], "18": [37, 38], "amd": [37, 38], "epyc": [37, 38], "7763": [37, 38], "64": [37, 38], "core": [37, 38], "processor": [37, 38], "2923": 37, "05675": 37, "15": [37, 38], "606": [37, 38], "gib": [37, 38], "note": [37, 38], "deploi": [37, 38], "document": [37, 38, 39], "automat": [37, 38], "execut": [37, 38], "github": [37, 38, 39], "action": [37, 38], "therefor": [37, 38], "mai": [37, 38], "2976": 38, "9235": 38, "hfutil": 39, "host": 39, "pypi": 39, "newest": 39, "u": 39, "com": 39, "script": 39, "__name__": 39, "__main__": 39, "develop": 39, "maintain": 39, "like": 39, "below": 39, "success": 39, "11": 39, "narugo1992": 39, "still": 39, "out": 39, "stabl": 39, "html": 39, "faq": 40}, "objects": {"hfutils": [[0, 0, 0, "-", "archive"], [2, 0, 0, "-", "cache"], [3, 0, 0, "-", "config"], [10, 0, 0, "-", "entry"], [18, 0, 0, "-", "index"], [23, 0, 0, "-", "operate"], [28, 0, 0, "-", "repository"], [32, 0, 0, "-", "utils"]], "hfutils.archive": [[0, 1, 1, "", "archive_pack"], [0, 1, 1, "", "archive_unpack"], [0, 1, 1, "", "get_archive_extname"], [0, 1, 1, "", "get_archive_type"], [0, 1, 1, "", "register_archive_type"]], "hfutils.cache": [[1, 0, 0, "-", "delete"]], "hfutils.cache.delete": [[1, 1, 1, "", "delete_cache"], [1, 1, 1, "", "delete_detached_cache"]], "hfutils.config": [[4, 0, 0, "-", "meta"]], "hfutils.config.meta": [[4, 2, 1, "", "__AUTHOR_EMAIL__"], [4, 2, 1, "", "__AUTHOR__"], [4, 2, 1, "", "__DESCRIPTION__"], [4, 2, 1, "", "__TITLE__"], [4, 2, 1, "", "__VERSION__"]], "hfutils.entry": [[5, 0, 0, "-", "base"], [6, 0, 0, "-", "cli"], [7, 0, 0, "-", "clone"], [8, 0, 0, "-", "dispatch"], [9, 0, 0, "-", "download"], [11, 0, 0, "-", "index"], [12, 0, 0, "-", "ls"], [13, 0, 0, "-", "ls_repo"], [14, 0, 0, "-", "rollback"], [15, 0, 0, "-", "upload"], [16, 0, 0, "-", "whoami"]], "hfutils.entry.base": [[5, 2, 1, "", "CONTEXT_SETTINGS"], [5, 3, 1, "", "ClickErrorException"], [5, 3, 1, "", "ClickWarningException"], [5, 3, 1, "", "KeyboardInterrupted"], [5, 1, 1, "", "command_wrap"], [5, 1, 1, "", "print_exception"]], "hfutils.entry.base.ClickErrorException": [[5, 4, 1, "", "exit_code"], [5, 5, 1, "", "show"]], "hfutils.entry.base.ClickWarningException": [[5, 4, 1, "", "exit_code"], [5, 5, 1, "", "show"]], "hfutils.entry.base.KeyboardInterrupted": [[5, 5, 1, "", "__init__"], [5, 4, 1, "", "exit_code"], [5, 5, 1, "", "show"]], "hfutils.entry.cli": [[6, 2, 1, "", "cli"]], "hfutils.entry.dispatch": [[8, 1, 1, "", "hfutilcli"], [8, 1, 1, "", "print_version"]], "hfutils.entry.download": [[9, 3, 1, "", "NoRemotePathAssignedWithDownload"]], "hfutils.entry.download.NoRemotePathAssignedWithDownload": [[9, 4, 1, "", "exit_code"], [9, 5, 1, "", "show"]], "hfutils.entry.ls": [[12, 3, 1, "", "ListItem"], [12, 6, 1, "", "ListItemType"]], "hfutils.entry.ls.ListItemType": [[12, 4, 1, "", "ARCHIVE"], [12, 4, 1, "", "DATA"], [12, 4, 1, "", "FILE"], [12, 4, 1, "", "FOLDER"], [12, 4, 1, "", "IMAGE"], [12, 4, 1, "", "MODEL"]], "hfutils.entry.ls_repo": [[13, 3, 1, "", "NoLocalAuthentication"]], "hfutils.entry.upload": [[15, 3, 1, "", "NoRemotePathAssignedWithUpload"]], "hfutils.entry.upload.NoRemotePathAssignedWithUpload": [[15, 4, 1, "", "exit_code"], [15, 5, 1, "", "show"]], "hfutils.index": [[17, 0, 0, "-", "fetch"], [19, 0, 0, "-", "make"], [20, 0, 0, "-", "validate"]], "hfutils.index.fetch": [[17, 3, 1, "", "ArchiveStandaloneFileHashNotMatch"], [17, 3, 1, "", "ArchiveStandaloneFileIncompleteDownload"], [17, 1, 1, "", "hf_tar_file_download"], [17, 1, 1, "", "hf_tar_file_exists"], [17, 1, 1, "", "hf_tar_file_info"], [17, 1, 1, "", "hf_tar_file_size"], [17, 1, 1, "", "hf_tar_get_index"], [17, 1, 1, "", "hf_tar_list_files"]], "hfutils.index.make": [[19, 1, 1, "", "hf_tar_create_from_directory"], [19, 1, 1, "", "hf_tar_create_index"], [19, 1, 1, "", "tar_create_index"], [19, 1, 1, "", "tar_get_index_info"]], "hfutils.index.validate": [[20, 1, 1, "", "hf_tar_item_validate"], [20, 1, 1, "", "hf_tar_validate"]], "hfutils.operate": [[21, 0, 0, "-", "base"], [22, 0, 0, "-", "download"], [24, 0, 0, "-", "upload"], [25, 0, 0, "-", "validate"]], "hfutils.operate.base": [[21, 1, 1, "", "get_hf_client"], [21, 1, 1, "", "get_hf_fs"], [21, 1, 1, "", "list_files_in_repository"]], "hfutils.operate.download": [[22, 1, 1, "", "download_archive_as_directory"], [22, 1, 1, "", "download_directory_as_directory"], [22, 1, 1, "", "download_file_to_file"]], "hfutils.operate.upload": [[24, 1, 1, "", "upload_directory_as_archive"], [24, 1, 1, "", "upload_directory_as_directory"], [24, 1, 1, "", "upload_file_to_file"]], "hfutils.operate.validate": [[25, 1, 1, "", "is_local_file_ready"]], "hfutils.repository": [[26, 0, 0, "-", "base"], [27, 0, 0, "-", "clone"], [29, 0, 0, "-", "rollback"]], "hfutils.repository.base": [[26, 1, 1, "", "hf_hub_repo_url"]], "hfutils.repository.clone": [[27, 1, 1, "", "hf_hub_clone"]], "hfutils.repository.rollback": [[29, 1, 1, "", "hf_hub_rollback"]], "hfutils.utils": [[30, 0, 0, "-", "binary"], [31, 0, 0, "-", "download"], [33, 0, 0, "-", "path"], [34, 0, 0, "-", "tqdm_"], [35, 0, 0, "-", "walk"]], "hfutils.utils.binary": [[30, 1, 1, "", "is_binary_file"]], "hfutils.utils.download": [[31, 1, 1, "", "download_file"]], "hfutils.utils.path": [[33, 3, 1, "", "HfFileSystemPath"], [33, 1, 1, "", "hf_fs_path"], [33, 1, 1, "", "hf_normpath"], [33, 1, 1, "", "parse_hf_fs_path"]], "hfutils.utils.tqdm_": [[34, 1, 1, "", "tqdm"]], "hfutils.utils.walk": [[35, 1, 1, "", "walk_files"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:data", "3": "py:class", "4": "py:attribute", "5": "py:method", "6": "py:enum"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "data", "Python data"], "3": ["py", "class", "Python class"], "4": ["py", "attribute", "Python attribute"], "5": ["py", "method", "Python method"], "6": ["py", "enum", "Python enum"]}, "titleterms": {"hfutil": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], "archiv": 0, "register_archive_typ": 0, "archive_pack": 0, "archive_unpack": 0, "get_archive_typ": 0, "get_archive_extnam": 0, "cach": [1, 2], "delet": 1, "delete_detached_cach": 1, "delete_cach": 1, "config": [3, 4], "meta": 4, "__title__": 4, "__version__": 4, "__description__": 4, "__author__": 4, "__author_email__": 4, "entri": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], "base": [5, 21, 26], "context_set": 5, "clickwarningexcept": 5, "clickerrorexcept": 5, "print_except": 5, "keyboardinterrupt": 5, "command_wrap": 5, "cli": 6, "clone": [7, 27], "dispatch": 8, "print_vers": 8, "hfutilcli": 8, "download": [9, 22, 31], "noremotepathassignedwithdownload": 9, "index": [11, 17, 18, 19, 20], "l": 12, "listitemtyp": 12, "listitem": 12, "ls_repo": 13, "nolocalauthent": 13, "rollback": [14, 29], "upload": [15, 24], "noremotepathassignedwithupload": 15, "whoami": 16, "fetch": 17, "archivestandalonefileincompletedownload": 17, "archivestandalonefilehashnotmatch": 17, "hf_tar_get_index": 17, "hf_tar_list_fil": 17, "hf_tar_file_exist": 17, "hf_tar_file_s": 17, "hf_tar_file_info": 17, "hf_tar_file_download": 17, "make": 19, "tar_create_index": 19, "hf_tar_create_index": 19, "tar_get_index_info": 19, "hf_tar_create_from_directori": 19, "valid": [20, 25], "hf_tar_item_valid": 20, "hf_tar_valid": 20, "oper": [21, 22, 23, 24, 25], "get_hf_client": 21, "get_hf_f": 21, "list_files_in_repositori": 21, "download_file_to_fil": 22, "download_archive_as_directori": 22, "download_directory_as_directori": 22, "upload_file_to_fil": 24, "upload_directory_as_arch": 24, "upload_directory_as_directori": 24, "is_local_file_readi": 25, "repositori": [26, 27, 28, 29], "hf_hub_repo_url": 26, "hf_hub_clon": 27, "hf_hub_rollback": 29, "util": [30, 31, 32, 33, 34, 35], "binari": 30, "is_binary_fil": 30, "download_fil": 31, "path": 33, "hf_normpath": 33, "hf_fs_path": 33, "parse_hf_fs_path": 33, "hffilesystempath": 33, "tqdm": 34, "walk": 35, "walk_fil": 35, "welcom": 36, "": 36, "document": 36, "overview": 36, "tutori": 36, "inform": [36, 37, 38], "api": 36, "run": [37, 38], "environ": [37, 38], "instal": 39, "quick": 40, "start": 40}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx.ext.todo": 2, "nbsphinx": 4, "sphinx": 58}, "alltitles": {"hfutils.archive": [[0, "module-hfutils.archive"]], "register_archive_type": [[0, "register-archive-type"]], "archive_pack": [[0, "archive-pack"]], "archive_unpack": [[0, "archive-unpack"]], "get_archive_type": [[0, "get-archive-type"]], "get_archive_extname": [[0, "get-archive-extname"]], "hfutils.cache.delete": [[1, "module-hfutils.cache.delete"]], "delete_detached_cache": [[1, "delete-detached-cache"]], "delete_cache": [[1, "delete-cache"]], "hfutils.cache": [[2, "module-hfutils.cache"]], "hfutils.config": [[3, "module-hfutils.config"]], "hfutils.config.meta": [[4, "module-hfutils.config.meta"]], "__TITLE__": [[4, "title"]], "__VERSION__": [[4, "version"]], "__DESCRIPTION__": [[4, "description"]], "__AUTHOR__": [[4, "author"]], "__AUTHOR_EMAIL__": [[4, "author-email"]], "hfutils.entry.base": [[5, "module-hfutils.entry.base"]], "CONTEXT_SETTINGS": [[5, "context-settings"]], "ClickWarningException": [[5, "clickwarningexception"]], "ClickErrorException": [[5, "clickerrorexception"]], "print_exception": [[5, "print-exception"]], "KeyboardInterrupted": [[5, "keyboardinterrupted"]], "command_wrap": [[5, "command-wrap"]], "hfutils.entry.cli": [[6, "module-hfutils.entry.cli"]], "cli": [[6, "cli"]], "hfutils.entry.clone": [[7, "module-hfutils.entry.clone"]], "hfutils.entry.dispatch": [[8, "module-hfutils.entry.dispatch"]], "print_version": [[8, "print-version"]], "hfutilcli": [[8, "hfutilcli"]], "hfutils.entry.download": [[9, "module-hfutils.entry.download"]], "NoRemotePathAssignedWithDownload": [[9, "noremotepathassignedwithdownload"]], "hfutils.entry": [[10, "module-hfutils.entry"]], "hfutils.entry.index": [[11, "module-hfutils.entry.index"]], "hfutils.entry.ls": [[12, "module-hfutils.entry.ls"]], "ListItemType": [[12, "listitemtype"]], "ListItem": [[12, "listitem"]], "hfutils.entry.ls_repo": [[13, "module-hfutils.entry.ls_repo"]], "NoLocalAuthentication": [[13, "nolocalauthentication"]], "hfutils.entry.rollback": [[14, "module-hfutils.entry.rollback"]], "hfutils.entry.upload": [[15, "module-hfutils.entry.upload"]], "NoRemotePathAssignedWithUpload": [[15, "noremotepathassignedwithupload"]], "hfutils.entry.whoami": [[16, "module-hfutils.entry.whoami"]], "hfutils.index.fetch": [[17, "module-hfutils.index.fetch"]], "ArchiveStandaloneFileIncompleteDownload": [[17, "archivestandalonefileincompletedownload"]], "ArchiveStandaloneFileHashNotMatch": [[17, "archivestandalonefilehashnotmatch"]], "hf_tar_get_index": [[17, "hf-tar-get-index"]], "hf_tar_list_files": [[17, "hf-tar-list-files"]], "hf_tar_file_exists": [[17, "hf-tar-file-exists"]], "hf_tar_file_size": [[17, "hf-tar-file-size"]], "hf_tar_file_info": [[17, "hf-tar-file-info"]], "hf_tar_file_download": [[17, "hf-tar-file-download"]], "hfutils.index": [[18, "module-hfutils.index"]], "hfutils.index.make": [[19, "module-hfutils.index.make"]], "tar_create_index": [[19, "tar-create-index"]], "hf_tar_create_index": [[19, "hf-tar-create-index"]], "tar_get_index_info": [[19, "tar-get-index-info"]], "hf_tar_create_from_directory": [[19, "hf-tar-create-from-directory"]], "hfutils.index.validate": [[20, "module-hfutils.index.validate"]], "hf_tar_item_validate": [[20, "hf-tar-item-validate"]], "hf_tar_validate": [[20, "hf-tar-validate"]], "hfutils.operate.base": [[21, "module-hfutils.operate.base"]], "get_hf_client": [[21, "get-hf-client"]], "get_hf_fs": [[21, "get-hf-fs"]], "list_files_in_repository": [[21, "list-files-in-repository"]], "hfutils.operate.download": [[22, "module-hfutils.operate.download"]], "download_file_to_file": [[22, "download-file-to-file"]], "download_archive_as_directory": [[22, "download-archive-as-directory"]], "download_directory_as_directory": [[22, "download-directory-as-directory"]], "hfutils.operate": [[23, "module-hfutils.operate"]], "hfutils.operate.upload": [[24, "module-hfutils.operate.upload"]], "upload_file_to_file": [[24, "upload-file-to-file"]], "upload_directory_as_archive": [[24, "upload-directory-as-archive"]], "upload_directory_as_directory": [[24, "upload-directory-as-directory"]], "hfutils.operate.validate": [[25, "module-hfutils.operate.validate"]], "is_local_file_ready": [[25, "is-local-file-ready"]], "hfutils.repository.base": [[26, "module-hfutils.repository.base"]], "hf_hub_repo_url": [[26, "hf-hub-repo-url"]], "hfutils.repository.clone": [[27, "module-hfutils.repository.clone"]], "hf_hub_clone": [[27, "hf-hub-clone"]], "hfutils.repository": [[28, "module-hfutils.repository"]], "hfutils.repository.rollback": [[29, "module-hfutils.repository.rollback"]], "hf_hub_rollback": [[29, "hf-hub-rollback"]], "hfutils.utils.binary": [[30, "module-hfutils.utils.binary"]], "is_binary_file": [[30, "is-binary-file"]], "hfutils.utils.download": [[31, "module-hfutils.utils.download"]], "download_file": [[31, "download-file"]], "hfutils.utils": [[32, "module-hfutils.utils"]], "hfutils.utils.path": [[33, "module-hfutils.utils.path"]], "hf_normpath": [[33, "hf-normpath"]], "hf_fs_path": [[33, "hf-fs-path"]], "parse_hf_fs_path": [[33, "parse-hf-fs-path"]], "HfFileSystemPath": [[33, "hffilesystempath"]], "hfutils.utils.tqdm": [[34, "module-hfutils.utils.tqdm_"]], "tqdm": [[34, "tqdm"]], "hfutils.utils.walk": [[35, "module-hfutils.utils.walk"]], "walk_files": [[35, "walk-files"]], "Welcome to hfutils\u2019s Documentation": [[36, "welcome-to-hfutils-s-documentation"]], "Overview": [[36, "overview"]], "Tutorials": [[36, null]], "Information": [[36, null]], "API Documentation": [[36, null]], "Run Environment Information": [[37, "Run-Environment-Information"], [38, "Run-Environment-Information"]], "Installation": [[39, "installation"]], "Quick Start": [[40, "quick-start"]]}, "indexentries": {"archive_pack() (in module hfutils.archive)": [[0, "hfutils.archive.archive_pack"]], "archive_unpack() (in module hfutils.archive)": [[0, "hfutils.archive.archive_unpack"]], "get_archive_extname() (in module hfutils.archive)": [[0, "hfutils.archive.get_archive_extname"]], "get_archive_type() (in module hfutils.archive)": [[0, "hfutils.archive.get_archive_type"]], "hfutils.archive": [[0, "module-hfutils.archive"]], "module": [[0, "module-hfutils.archive"], [1, "module-hfutils.cache.delete"], [2, "module-hfutils.cache"], [3, "module-hfutils.config"], [4, "module-hfutils.config.meta"], [5, "module-hfutils.entry.base"], [6, "module-hfutils.entry.cli"], [7, "module-hfutils.entry.clone"], [8, "module-hfutils.entry.dispatch"], [9, "module-hfutils.entry.download"], [10, "module-hfutils.entry"], [11, "module-hfutils.entry.index"], [12, "module-hfutils.entry.ls"], [13, "module-hfutils.entry.ls_repo"], [14, "module-hfutils.entry.rollback"], [15, "module-hfutils.entry.upload"], [16, "module-hfutils.entry.whoami"], [17, "module-hfutils.index.fetch"], [18, "module-hfutils.index"], [19, "module-hfutils.index.make"], [20, "module-hfutils.index.validate"], [21, "module-hfutils.operate.base"], [22, "module-hfutils.operate.download"], [23, "module-hfutils.operate"], [24, "module-hfutils.operate.upload"], [25, "module-hfutils.operate.validate"], [26, "module-hfutils.repository.base"], [27, "module-hfutils.repository.clone"], [28, "module-hfutils.repository"], [29, "module-hfutils.repository.rollback"], [30, "module-hfutils.utils.binary"], [31, "module-hfutils.utils.download"], [32, "module-hfutils.utils"], [33, "module-hfutils.utils.path"], [34, "module-hfutils.utils.tqdm_"], [35, "module-hfutils.utils.walk"]], "register_archive_type() (in module hfutils.archive)": [[0, "hfutils.archive.register_archive_type"]], "delete_cache() (in module hfutils.cache.delete)": [[1, "hfutils.cache.delete.delete_cache"]], "delete_detached_cache() (in module hfutils.cache.delete)": [[1, "hfutils.cache.delete.delete_detached_cache"]], "hfutils.cache.delete": [[1, "module-hfutils.cache.delete"]], "hfutils.cache": [[2, "module-hfutils.cache"]], "hfutils.config": [[3, "module-hfutils.config"]], "__author_email__ (in module hfutils.config.meta)": [[4, "hfutils.config.meta.__AUTHOR_EMAIL__"]], "__author__ (in module hfutils.config.meta)": [[4, "hfutils.config.meta.__AUTHOR__"]], "__description__ (in module hfutils.config.meta)": [[4, "hfutils.config.meta.__DESCRIPTION__"]], "__title__ (in module hfutils.config.meta)": [[4, "hfutils.config.meta.__TITLE__"]], "__version__ (in module hfutils.config.meta)": [[4, "hfutils.config.meta.__VERSION__"]], "hfutils.config.meta": [[4, "module-hfutils.config.meta"]], "context_settings (in module hfutils.entry.base)": [[5, "hfutils.entry.base.CONTEXT_SETTINGS"]], "clickerrorexception (class in hfutils.entry.base)": [[5, "hfutils.entry.base.ClickErrorException"]], "clickwarningexception (class in hfutils.entry.base)": [[5, "hfutils.entry.base.ClickWarningException"]], "keyboardinterrupted (class in hfutils.entry.base)": [[5, "hfutils.entry.base.KeyboardInterrupted"]], "__init__() (hfutils.entry.base.keyboardinterrupted method)": [[5, "hfutils.entry.base.KeyboardInterrupted.__init__"]], "command_wrap() (in module hfutils.entry.base)": [[5, "hfutils.entry.base.command_wrap"]], "exit_code (hfutils.entry.base.clickerrorexception attribute)": [[5, "hfutils.entry.base.ClickErrorException.exit_code"]], "exit_code (hfutils.entry.base.clickwarningexception attribute)": [[5, "hfutils.entry.base.ClickWarningException.exit_code"]], "exit_code (hfutils.entry.base.keyboardinterrupted attribute)": [[5, "hfutils.entry.base.KeyboardInterrupted.exit_code"]], "hfutils.entry.base": [[5, "module-hfutils.entry.base"]], "print_exception() (in module hfutils.entry.base)": [[5, "hfutils.entry.base.print_exception"]], "show() (hfutils.entry.base.clickerrorexception method)": [[5, "hfutils.entry.base.ClickErrorException.show"]], "show() (hfutils.entry.base.clickwarningexception method)": [[5, "hfutils.entry.base.ClickWarningException.show"]], "show() (hfutils.entry.base.keyboardinterrupted method)": [[5, "hfutils.entry.base.KeyboardInterrupted.show"]], "cli (in module hfutils.entry.cli)": [[6, "hfutils.entry.cli.cli"]], "hfutils.entry.cli": [[6, "module-hfutils.entry.cli"]], "hfutils.entry.clone": [[7, "module-hfutils.entry.clone"]], "hfutilcli() (in module hfutils.entry.dispatch)": [[8, "hfutils.entry.dispatch.hfutilcli"]], "hfutils.entry.dispatch": [[8, "module-hfutils.entry.dispatch"]], "print_version() (in module hfutils.entry.dispatch)": [[8, "hfutils.entry.dispatch.print_version"]], "noremotepathassignedwithdownload (class in hfutils.entry.download)": [[9, "hfutils.entry.download.NoRemotePathAssignedWithDownload"]], "exit_code (hfutils.entry.download.noremotepathassignedwithdownload attribute)": [[9, "hfutils.entry.download.NoRemotePathAssignedWithDownload.exit_code"]], "hfutils.entry.download": [[9, "module-hfutils.entry.download"]], "show() (hfutils.entry.download.noremotepathassignedwithdownload method)": [[9, "hfutils.entry.download.NoRemotePathAssignedWithDownload.show"]], "hfutils.entry": [[10, "module-hfutils.entry"]], "hfutils.entry.index": [[11, "module-hfutils.entry.index"]], "archive (hfutils.entry.ls.listitemtype attribute)": [[12, "hfutils.entry.ls.ListItemType.ARCHIVE"]], "data (hfutils.entry.ls.listitemtype attribute)": [[12, "hfutils.entry.ls.ListItemType.DATA"]], "file (hfutils.entry.ls.listitemtype attribute)": [[12, "hfutils.entry.ls.ListItemType.FILE"]], "folder (hfutils.entry.ls.listitemtype attribute)": [[12, "hfutils.entry.ls.ListItemType.FOLDER"]], "image (hfutils.entry.ls.listitemtype attribute)": [[12, "hfutils.entry.ls.ListItemType.IMAGE"]], "listitem (class in hfutils.entry.ls)": [[12, "hfutils.entry.ls.ListItem"]], "model (hfutils.entry.ls.listitemtype attribute)": [[12, "hfutils.entry.ls.ListItemType.MODEL"]], "hfutils.entry.ls": [[12, "module-hfutils.entry.ls"]], "nolocalauthentication (class in hfutils.entry.ls_repo)": [[13, "hfutils.entry.ls_repo.NoLocalAuthentication"]], "hfutils.entry.ls_repo": [[13, "module-hfutils.entry.ls_repo"]], "hfutils.entry.rollback": [[14, "module-hfutils.entry.rollback"]], "noremotepathassignedwithupload (class in hfutils.entry.upload)": [[15, "hfutils.entry.upload.NoRemotePathAssignedWithUpload"]], "exit_code (hfutils.entry.upload.noremotepathassignedwithupload attribute)": [[15, "hfutils.entry.upload.NoRemotePathAssignedWithUpload.exit_code"]], "hfutils.entry.upload": [[15, "module-hfutils.entry.upload"]], "show() (hfutils.entry.upload.noremotepathassignedwithupload method)": [[15, "hfutils.entry.upload.NoRemotePathAssignedWithUpload.show"]], "hfutils.entry.whoami": [[16, "module-hfutils.entry.whoami"]], "archivestandalonefilehashnotmatch (class in hfutils.index.fetch)": [[17, "hfutils.index.fetch.ArchiveStandaloneFileHashNotMatch"]], "archivestandalonefileincompletedownload (class in hfutils.index.fetch)": [[17, "hfutils.index.fetch.ArchiveStandaloneFileIncompleteDownload"]], "hf_tar_file_download() (in module hfutils.index.fetch)": [[17, "hfutils.index.fetch.hf_tar_file_download"]], "hf_tar_file_exists() (in module hfutils.index.fetch)": [[17, "hfutils.index.fetch.hf_tar_file_exists"]], "hf_tar_file_info() (in module hfutils.index.fetch)": [[17, "hfutils.index.fetch.hf_tar_file_info"]], "hf_tar_file_size() (in module hfutils.index.fetch)": [[17, "hfutils.index.fetch.hf_tar_file_size"]], "hf_tar_get_index() (in module hfutils.index.fetch)": [[17, "hfutils.index.fetch.hf_tar_get_index"]], "hf_tar_list_files() (in module hfutils.index.fetch)": [[17, "hfutils.index.fetch.hf_tar_list_files"]], "hfutils.index.fetch": [[17, "module-hfutils.index.fetch"]], "hfutils.index": [[18, "module-hfutils.index"]], "hf_tar_create_from_directory() (in module hfutils.index.make)": [[19, "hfutils.index.make.hf_tar_create_from_directory"]], "hf_tar_create_index() (in module hfutils.index.make)": [[19, "hfutils.index.make.hf_tar_create_index"]], "hfutils.index.make": [[19, "module-hfutils.index.make"]], "tar_create_index() (in module hfutils.index.make)": [[19, "hfutils.index.make.tar_create_index"]], "tar_get_index_info() (in module hfutils.index.make)": [[19, "hfutils.index.make.tar_get_index_info"]], "hf_tar_item_validate() (in module hfutils.index.validate)": [[20, "hfutils.index.validate.hf_tar_item_validate"]], "hf_tar_validate() (in module hfutils.index.validate)": [[20, "hfutils.index.validate.hf_tar_validate"]], "hfutils.index.validate": [[20, "module-hfutils.index.validate"]], "get_hf_client() (in module hfutils.operate.base)": [[21, "hfutils.operate.base.get_hf_client"]], "get_hf_fs() (in module hfutils.operate.base)": [[21, "hfutils.operate.base.get_hf_fs"]], "hfutils.operate.base": [[21, "module-hfutils.operate.base"]], "list_files_in_repository() (in module hfutils.operate.base)": [[21, "hfutils.operate.base.list_files_in_repository"]], "download_archive_as_directory() (in module hfutils.operate.download)": [[22, "hfutils.operate.download.download_archive_as_directory"]], "download_directory_as_directory() (in module hfutils.operate.download)": [[22, "hfutils.operate.download.download_directory_as_directory"]], "download_file_to_file() (in module hfutils.operate.download)": [[22, "hfutils.operate.download.download_file_to_file"]], "hfutils.operate.download": [[22, "module-hfutils.operate.download"]], "hfutils.operate": [[23, "module-hfutils.operate"]], "hfutils.operate.upload": [[24, "module-hfutils.operate.upload"]], "upload_directory_as_archive() (in module hfutils.operate.upload)": [[24, "hfutils.operate.upload.upload_directory_as_archive"]], "upload_directory_as_directory() (in module hfutils.operate.upload)": [[24, "hfutils.operate.upload.upload_directory_as_directory"]], "upload_file_to_file() (in module hfutils.operate.upload)": [[24, "hfutils.operate.upload.upload_file_to_file"]], "hfutils.operate.validate": [[25, "module-hfutils.operate.validate"]], "is_local_file_ready() (in module hfutils.operate.validate)": [[25, "hfutils.operate.validate.is_local_file_ready"]], "hf_hub_repo_url() (in module hfutils.repository.base)": [[26, "hfutils.repository.base.hf_hub_repo_url"]], "hfutils.repository.base": [[26, "module-hfutils.repository.base"]], "hf_hub_clone() (in module hfutils.repository.clone)": [[27, "hfutils.repository.clone.hf_hub_clone"]], "hfutils.repository.clone": [[27, "module-hfutils.repository.clone"]], "hfutils.repository": [[28, "module-hfutils.repository"]], "hf_hub_rollback() (in module hfutils.repository.rollback)": [[29, "hfutils.repository.rollback.hf_hub_rollback"]], "hfutils.repository.rollback": [[29, "module-hfutils.repository.rollback"]], "hfutils.utils.binary": [[30, "module-hfutils.utils.binary"]], "is_binary_file() (in module hfutils.utils.binary)": [[30, "hfutils.utils.binary.is_binary_file"]], "download_file() (in module hfutils.utils.download)": [[31, "hfutils.utils.download.download_file"]], "hfutils.utils.download": [[31, "module-hfutils.utils.download"]], "hfutils.utils": [[32, "module-hfutils.utils"]], "hffilesystempath (class in hfutils.utils.path)": [[33, "hfutils.utils.path.HfFileSystemPath"]], "hf_fs_path() (in module hfutils.utils.path)": [[33, "hfutils.utils.path.hf_fs_path"]], "hf_normpath() (in module hfutils.utils.path)": [[33, "hfutils.utils.path.hf_normpath"]], "hfutils.utils.path": [[33, "module-hfutils.utils.path"]], "parse_hf_fs_path() (in module hfutils.utils.path)": [[33, "hfutils.utils.path.parse_hf_fs_path"]], "hfutils.utils.tqdm_": [[34, "module-hfutils.utils.tqdm_"]], "tqdm() (in module hfutils.utils.tqdm_)": [[34, "hfutils.utils.tqdm_.tqdm"]], "hfutils.utils.walk": [[35, "module-hfutils.utils.walk"]], "walk_files() (in module hfutils.utils.walk)": [[35, "hfutils.utils.walk.walk_files"]]}}) \ No newline at end of file diff --git a/dev/entry/tutorials/installation/index.html b/dev/entry/tutorials/installation/index.html new file mode 100644 index 0000000000..f26fa6ecb6 --- /dev/null +++ b/dev/entry/tutorials/installation/index.html @@ -0,0 +1,200 @@ + + + + + + + Installation — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

Installation

+

hfutils is currently hosted on PyPI. It required python >= 3.8.

+

You can simply install hfutils from PyPI with the following command:

+
pip install hfutils
+
+
+

You can also install with the newest version through GitHub:

+
pip install -U git+https://github.com/deepghs/hfutils@main
+
+
+

You can check your installation by the following python script:

+
1from hfutils.config.meta import __TITLE__, __AUTHOR__, __VERSION__, __DESCRIPTION__
+2
+3if __name__ == '__main__':
+4    print(__TITLE__, __VERSION__)
+5    print('Developed and maintained by', __AUTHOR__)
+6    print(__DESCRIPTION__)
+
+
+

The output should be like below, which means your installation is successful.

+
1hfutils 0.2.11
+2Developed and maintained by narugo1992
+3Useful utilities for huggingface
+
+
+

hfutils is still under development, you can also check out the documents in stable version through https://deepghs.github.io/hfutils/main/index.html.

+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/entry/tutorials/quick_start/index.html b/dev/entry/tutorials/quick_start/index.html new file mode 100644 index 0000000000..9cb8892073 --- /dev/null +++ b/dev/entry/tutorials/quick_start/index.html @@ -0,0 +1,176 @@ + + + + + + + Quick Start — hfutils 0.2.11 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + + +
+

Quick Start

+

faq

+
+ + + +
+
+ +
+
+
+
+ +
+ + Other Versions + v: dev/entry + + +
+
+
Tags
+
v0.0.1
+
v0.0.2
+
v0.0.3
+
v0.0.4
+
v0.0.5
+
v0.0.6
+
v0.1.0
+
v0.1.1
+
v0.1.2
+
v0.2.0
+
v0.2.1
+
v0.2.10
+
v0.2.11
+
v0.2.2
+
v0.2.3
+
v0.2.4
+
v0.2.5
+
v0.2.6
+
v0.2.7
+
v0.2.8
+
v0.2.9
+
+
+
Branches
+
dev/entry
+
dev/rate
+
main
+
+
+
+ + + \ No newline at end of file diff --git a/dev/rate/.buildinfo b/dev/rate/.buildinfo index baff798fa6..c1c07e075e 100644 --- a/dev/rate/.buildinfo +++ b/dev/rate/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: e0d819fc9c2e50b39310b5ebd9a6e2a8 +config: 88c3d5a2eb1cac27a25de5b66eaa9878 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/dev/rate/.doctrees/api_doc/archive/index.doctree b/dev/rate/.doctrees/api_doc/archive/index.doctree index 958493bf2f..47a09380a8 100644 Binary files a/dev/rate/.doctrees/api_doc/archive/index.doctree and b/dev/rate/.doctrees/api_doc/archive/index.doctree differ diff --git a/dev/rate/.doctrees/api_doc/cache/delete.doctree b/dev/rate/.doctrees/api_doc/cache/delete.doctree index ea3e15d9e3..4de303ae59 100644 Binary files a/dev/rate/.doctrees/api_doc/cache/delete.doctree and b/dev/rate/.doctrees/api_doc/cache/delete.doctree differ diff --git a/dev/rate/.doctrees/api_doc/cache/index.doctree b/dev/rate/.doctrees/api_doc/cache/index.doctree index 40e8502af5..6b5764626e 100644 Binary files a/dev/rate/.doctrees/api_doc/cache/index.doctree and b/dev/rate/.doctrees/api_doc/cache/index.doctree differ diff --git a/dev/rate/.doctrees/api_doc/config/index.doctree b/dev/rate/.doctrees/api_doc/config/index.doctree index de2233114b..222d923a0d 100644 Binary files a/dev/rate/.doctrees/api_doc/config/index.doctree and b/dev/rate/.doctrees/api_doc/config/index.doctree differ diff --git a/dev/rate/.doctrees/api_doc/config/meta.doctree b/dev/rate/.doctrees/api_doc/config/meta.doctree index c57491fa42..e052948df8 100644 Binary files a/dev/rate/.doctrees/api_doc/config/meta.doctree and b/dev/rate/.doctrees/api_doc/config/meta.doctree differ diff --git a/dev/rate/.doctrees/api_doc/entry/base.doctree b/dev/rate/.doctrees/api_doc/entry/base.doctree index cb21fd7fe9..27a907d5d2 100644 Binary files a/dev/rate/.doctrees/api_doc/entry/base.doctree and b/dev/rate/.doctrees/api_doc/entry/base.doctree differ diff --git a/dev/rate/.doctrees/api_doc/entry/cli.doctree b/dev/rate/.doctrees/api_doc/entry/cli.doctree index df8a3a00de..5639ae5fdf 100644 Binary files a/dev/rate/.doctrees/api_doc/entry/cli.doctree and b/dev/rate/.doctrees/api_doc/entry/cli.doctree differ diff --git a/dev/rate/.doctrees/api_doc/entry/dispatch.doctree b/dev/rate/.doctrees/api_doc/entry/dispatch.doctree index 731bc00be1..13fb46f18a 100644 Binary files a/dev/rate/.doctrees/api_doc/entry/dispatch.doctree and b/dev/rate/.doctrees/api_doc/entry/dispatch.doctree differ diff --git a/dev/rate/.doctrees/api_doc/entry/download.doctree b/dev/rate/.doctrees/api_doc/entry/download.doctree index 20991f8759..8be3cac407 100644 Binary files a/dev/rate/.doctrees/api_doc/entry/download.doctree and b/dev/rate/.doctrees/api_doc/entry/download.doctree differ diff --git a/dev/rate/.doctrees/api_doc/entry/index.doctree b/dev/rate/.doctrees/api_doc/entry/index.doctree index 9808fbc75d..b34c88a87f 100644 Binary files a/dev/rate/.doctrees/api_doc/entry/index.doctree and b/dev/rate/.doctrees/api_doc/entry/index.doctree differ diff --git a/dev/rate/.doctrees/api_doc/entry/ls.doctree b/dev/rate/.doctrees/api_doc/entry/ls.doctree index 75685820e0..f60f4a5e5f 100644 Binary files a/dev/rate/.doctrees/api_doc/entry/ls.doctree and b/dev/rate/.doctrees/api_doc/entry/ls.doctree differ diff --git a/dev/rate/.doctrees/api_doc/entry/ls_repo.doctree b/dev/rate/.doctrees/api_doc/entry/ls_repo.doctree index f19028451d..78f62902a4 100644 Binary files a/dev/rate/.doctrees/api_doc/entry/ls_repo.doctree and b/dev/rate/.doctrees/api_doc/entry/ls_repo.doctree differ diff --git a/dev/rate/.doctrees/api_doc/entry/upload.doctree b/dev/rate/.doctrees/api_doc/entry/upload.doctree index c1ba3471bd..c2f30aa64a 100644 Binary files a/dev/rate/.doctrees/api_doc/entry/upload.doctree and b/dev/rate/.doctrees/api_doc/entry/upload.doctree differ diff --git a/dev/rate/.doctrees/api_doc/entry/whoami.doctree b/dev/rate/.doctrees/api_doc/entry/whoami.doctree index 1cd26885d5..2a70c53628 100644 Binary files a/dev/rate/.doctrees/api_doc/entry/whoami.doctree and b/dev/rate/.doctrees/api_doc/entry/whoami.doctree differ diff --git a/dev/rate/.doctrees/api_doc/index/fetch.doctree b/dev/rate/.doctrees/api_doc/index/fetch.doctree index 70888d8601..48d1e60286 100644 Binary files a/dev/rate/.doctrees/api_doc/index/fetch.doctree and b/dev/rate/.doctrees/api_doc/index/fetch.doctree differ diff --git a/dev/rate/.doctrees/api_doc/index/index.doctree b/dev/rate/.doctrees/api_doc/index/index.doctree index 404b53b1d7..0d3405e8b4 100644 Binary files a/dev/rate/.doctrees/api_doc/index/index.doctree and b/dev/rate/.doctrees/api_doc/index/index.doctree differ diff --git a/dev/rate/.doctrees/api_doc/index/make.doctree b/dev/rate/.doctrees/api_doc/index/make.doctree index 8699bf46f9..402b20ff77 100644 Binary files a/dev/rate/.doctrees/api_doc/index/make.doctree and b/dev/rate/.doctrees/api_doc/index/make.doctree differ diff --git a/dev/rate/.doctrees/api_doc/index/validate.doctree b/dev/rate/.doctrees/api_doc/index/validate.doctree index f7551181c5..056a749303 100644 Binary files a/dev/rate/.doctrees/api_doc/index/validate.doctree and b/dev/rate/.doctrees/api_doc/index/validate.doctree differ diff --git a/dev/rate/.doctrees/api_doc/operate/base.doctree b/dev/rate/.doctrees/api_doc/operate/base.doctree index b1ea57caac..839bedb1a0 100644 Binary files a/dev/rate/.doctrees/api_doc/operate/base.doctree and b/dev/rate/.doctrees/api_doc/operate/base.doctree differ diff --git a/dev/rate/.doctrees/api_doc/operate/download.doctree b/dev/rate/.doctrees/api_doc/operate/download.doctree index ffceaf2c44..c048c5927b 100644 Binary files a/dev/rate/.doctrees/api_doc/operate/download.doctree and b/dev/rate/.doctrees/api_doc/operate/download.doctree differ diff --git a/dev/rate/.doctrees/api_doc/operate/index.doctree b/dev/rate/.doctrees/api_doc/operate/index.doctree index 62ac6721c9..9ec4448ec7 100644 Binary files a/dev/rate/.doctrees/api_doc/operate/index.doctree and b/dev/rate/.doctrees/api_doc/operate/index.doctree differ diff --git a/dev/rate/.doctrees/api_doc/operate/upload.doctree b/dev/rate/.doctrees/api_doc/operate/upload.doctree index f5f30efe16..7c80827219 100644 Binary files a/dev/rate/.doctrees/api_doc/operate/upload.doctree and b/dev/rate/.doctrees/api_doc/operate/upload.doctree differ diff --git a/dev/rate/.doctrees/api_doc/operate/validate.doctree b/dev/rate/.doctrees/api_doc/operate/validate.doctree index df2032ded8..1b5c666a9c 100644 Binary files a/dev/rate/.doctrees/api_doc/operate/validate.doctree and b/dev/rate/.doctrees/api_doc/operate/validate.doctree differ diff --git a/dev/rate/.doctrees/api_doc/utils/binary.doctree b/dev/rate/.doctrees/api_doc/utils/binary.doctree index 1e089851bf..105bf7c6e2 100644 Binary files a/dev/rate/.doctrees/api_doc/utils/binary.doctree and b/dev/rate/.doctrees/api_doc/utils/binary.doctree differ diff --git a/dev/rate/.doctrees/api_doc/utils/download.doctree b/dev/rate/.doctrees/api_doc/utils/download.doctree index 5aebca506f..be21f1245b 100644 Binary files a/dev/rate/.doctrees/api_doc/utils/download.doctree and b/dev/rate/.doctrees/api_doc/utils/download.doctree differ diff --git a/dev/rate/.doctrees/api_doc/utils/index.doctree b/dev/rate/.doctrees/api_doc/utils/index.doctree index 9d89e8b0c0..4d62ac5463 100644 Binary files a/dev/rate/.doctrees/api_doc/utils/index.doctree and b/dev/rate/.doctrees/api_doc/utils/index.doctree differ diff --git a/dev/rate/.doctrees/api_doc/utils/path.doctree b/dev/rate/.doctrees/api_doc/utils/path.doctree index 7d14770a46..02d7255ca4 100644 Binary files a/dev/rate/.doctrees/api_doc/utils/path.doctree and b/dev/rate/.doctrees/api_doc/utils/path.doctree differ diff --git a/dev/rate/.doctrees/api_doc/utils/tqdm_.doctree b/dev/rate/.doctrees/api_doc/utils/tqdm_.doctree index 3784713e1f..5ce830f89a 100644 Binary files a/dev/rate/.doctrees/api_doc/utils/tqdm_.doctree and b/dev/rate/.doctrees/api_doc/utils/tqdm_.doctree differ diff --git a/dev/rate/.doctrees/api_doc/utils/walk.doctree b/dev/rate/.doctrees/api_doc/utils/walk.doctree index 061f8a8c6b..d9c6b5ab21 100644 Binary files a/dev/rate/.doctrees/api_doc/utils/walk.doctree and b/dev/rate/.doctrees/api_doc/utils/walk.doctree differ diff --git a/dev/rate/.doctrees/environment.pickle b/dev/rate/.doctrees/environment.pickle index e2fbfc262d..fd7198d10c 100644 Binary files a/dev/rate/.doctrees/environment.pickle and b/dev/rate/.doctrees/environment.pickle differ diff --git a/dev/rate/.doctrees/index.doctree b/dev/rate/.doctrees/index.doctree index 1fb0aa2aa9..8509eb5e65 100644 Binary files a/dev/rate/.doctrees/index.doctree and b/dev/rate/.doctrees/index.doctree differ diff --git a/dev/rate/.doctrees/information/environment.doctree b/dev/rate/.doctrees/information/environment.doctree index 58420fb467..dc1a8beea1 100644 Binary files a/dev/rate/.doctrees/information/environment.doctree and b/dev/rate/.doctrees/information/environment.doctree differ diff --git a/dev/rate/.doctrees/information/environment.result.doctree b/dev/rate/.doctrees/information/environment.result.doctree index cfbc844609..9a6ec0d055 100644 Binary files a/dev/rate/.doctrees/information/environment.result.doctree and b/dev/rate/.doctrees/information/environment.result.doctree differ diff --git a/dev/rate/.doctrees/nbsphinx/information/environment.ipynb b/dev/rate/.doctrees/nbsphinx/information/environment.ipynb index 2211b346d4..dd91f2fb3e 100644 --- a/dev/rate/.doctrees/nbsphinx/information/environment.ipynb +++ b/dev/rate/.doctrees/nbsphinx/information/environment.ipynb @@ -29,10 +29,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-07-21T08:11:41.883058Z", - "iopub.status.busy": "2024-07-21T08:11:41.882854Z", - "iopub.status.idle": "2024-07-21T08:11:43.050566Z", - "shell.execute_reply": "2024-07-21T08:11:43.049819Z" + "iopub.execute_input": "2024-07-21T08:41:22.365503Z", + "iopub.status.busy": "2024-07-21T08:41:22.365297Z", + "iopub.status.idle": "2024-07-21T08:41:23.534927Z", + "shell.execute_reply": "2024-07-21T08:41:23.534157Z" }, "pycharm": { "name": "#%%\n" @@ -53,7 +53,7 @@ "text": [ "CPU Brand: AMD EPYC 7763 64-Core Processor\n", "CPU Count: 4\n", - "CPU Freq: 2717.1655 MHz\n", + "CPU Freq: 2938.384 MHz\n", "Memory Size: 15.606 GiB\n", "Has CUDA: No\n" ] diff --git a/dev/rate/.doctrees/nbsphinx/information/environment.result.ipynb b/dev/rate/.doctrees/nbsphinx/information/environment.result.ipynb index f9b40e3c64..8fc2926ebb 100644 --- a/dev/rate/.doctrees/nbsphinx/information/environment.result.ipynb +++ b/dev/rate/.doctrees/nbsphinx/information/environment.result.ipynb @@ -29,10 +29,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-07-21T07:19:07.174030Z", - "iopub.status.busy": "2024-07-21T07:19:07.173636Z", - "iopub.status.idle": "2024-07-21T07:19:08.347756Z", - "shell.execute_reply": "2024-07-21T07:19:08.346972Z" + "iopub.execute_input": "2024-07-21T07:48:51.420175Z", + "iopub.status.busy": "2024-07-21T07:48:51.419972Z", + "iopub.status.idle": "2024-07-21T07:48:52.598243Z", + "shell.execute_reply": "2024-07-21T07:48:52.597444Z" }, "pycharm": { "name": "#%%\n" @@ -53,7 +53,7 @@ "text": [ "CPU Brand: AMD EPYC 7763 64-Core Processor\n", "CPU Count: 4\n", - "CPU Freq: 3182.8819999999996 MHz\n", + "CPU Freq: 3248.1414999999997 MHz\n", "Memory Size: 15.606 GiB\n", "Has CUDA: No\n" ] diff --git a/dev/rate/.doctrees/tutorials/installation/index.doctree b/dev/rate/.doctrees/tutorials/installation/index.doctree index 949fb7d4ed..4510f4a243 100644 Binary files a/dev/rate/.doctrees/tutorials/installation/index.doctree and b/dev/rate/.doctrees/tutorials/installation/index.doctree differ diff --git a/dev/rate/.doctrees/tutorials/quick_start/index.doctree b/dev/rate/.doctrees/tutorials/quick_start/index.doctree index c247b4d276..f71b7d2eca 100644 Binary files a/dev/rate/.doctrees/tutorials/quick_start/index.doctree and b/dev/rate/.doctrees/tutorials/quick_start/index.doctree differ diff --git a/dev/rate/_modules/hfutils/archive/base.html b/dev/rate/_modules/hfutils/archive/base.html index fbcdd3b602..6c703126e4 100644 --- a/dev/rate/_modules/hfutils/archive/base.html +++ b/dev/rate/_modules/hfutils/archive/base.html @@ -259,8 +259,9 @@

Source code for hfutils.archive.base

                 
                 
Branches
-
main
+
dev/entry
dev/rate
+
main