From 8e7ebf831b8d748d7d1a94f710dca2d934579e9e Mon Sep 17 00:00:00 2001 From: Zituo Jin <89419905+zituo-jin@users.noreply.github.com> Date: Mon, 29 Jan 2024 16:47:12 +0000 Subject: [PATCH] DEVPROD-4113: Change log level to debug in "Version" constructor, upgrade libraries (#162) --- _modules/evergreen/alias.html | 28 +- _modules/evergreen/api.html | 202 +- _modules/evergreen/api_requests.html | 46 +- _modules/evergreen/base.html | 34 +- _modules/evergreen/build.html | 42 +- _modules/evergreen/commitqueue.html | 28 +- _modules/evergreen/config.html | 26 +- _modules/evergreen/distro.html | 58 +- _modules/evergreen/errors/exceptions.html | 30 +- _modules/evergreen/host.html | 44 +- _modules/evergreen/manifest.html | 28 +- _modules/evergreen/metrics/buildmetrics.html | 74 +- .../evergreen/metrics/versionmetrics.html | 56 +- _modules/evergreen/patch.html | 58 +- _modules/evergreen/performance_results.html | 54 +- _modules/evergreen/project.html | 26 +- .../evergreen/resource_type_permissions.html | 26 +- _modules/evergreen/stats.html | 26 +- _modules/evergreen/task.html | 100 +- _modules/evergreen/task_annotations.html | 54 +- _modules/evergreen/task_reliability.html | 22 +- _modules/evergreen/tst.html | 30 +- _modules/evergreen/users_for_role.html | 22 +- _modules/evergreen/util.html | 32 +- _modules/evergreen/version.html | 68 +- _modules/index.html | 18 +- .../_sphinx_javascript_frameworks_compat.js | 134 + _static/basic.css | 147 +- _static/doctools.js | 383 +- _static/documentation_options.js | 8 +- _static/{jquery-3.5.1.js => jquery-3.6.0.js} | 227 +- _static/jquery.js | 4 +- _static/language_data.js | 102 +- _static/searchtools.js | 820 +-- _static/sphinx_highlight.js | 144 + ...erscore-1.12.0.js => underscore-1.13.1.js} | 151 +- _static/underscore.js | 8 +- evergreen.errors.html | 76 +- evergreen.html | 4599 ++++++++++------- evergreen.metrics.html | 360 +- genindex.html | 568 +- getting_started.html | 83 +- index.html | 45 +- modules.html | 817 ++- objects.inv | Bin 4760 -> 4865 bytes py-modindex.html | 18 +- sample_usage.html | 41 +- search.html | 29 +- searchindex.js | 2 +- 49 files changed, 5935 insertions(+), 4063 deletions(-) create mode 100644 _static/_sphinx_javascript_frameworks_compat.js rename _static/{jquery-3.5.1.js => jquery-3.6.0.js} (98%) create mode 100644 _static/sphinx_highlight.js rename _static/{underscore-1.12.0.js => underscore-1.13.1.js} (94%) diff --git a/_modules/evergreen/alias.html b/_modules/evergreen/alias.html index 40994732..760c8e9c 100644 --- a/_modules/evergreen/alias.html +++ b/_modules/evergreen/alias.html @@ -1,17 +1,19 @@ - + - evergreen.alias — evergreen.py 3.6.19 documentation - - - + evergreen.alias — evergreen.py 3.6.20 documentation + + + + + @@ -52,13 +54,13 @@

Source code for evergreen.alias

 
 
 
[docs]class DisplayTaskAlias(_BaseEvergreenObject): - """Representation of a DisplayTask in an alias.""" + """Representation of a DisplayTask in an alias.""" name = evg_attrib("Name") execution_tasks = evg_attrib("ExecutionTasks") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """ + """ Create an instance of a display task alias. :param json: json representing a display task alias. @@ -68,13 +70,13 @@

Source code for evergreen.alias

 
 
 
[docs]class VariantAlias(_BaseEvergreenObject): - """Representation of an alias for a particular build variant.""" + """Representation of an alias for a particular build variant.""" variant = evg_attrib("Variant") tasks = evg_attrib("Tasks") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """ + """ Create an instance of a variant alias. :param json: json representing variant alias. @@ -84,7 +86,7 @@

Source code for evergreen.alias

 
     @property
     def display_tasks(self) -> List[DisplayTaskAlias]:
-        """Get a list of display tasks for the alias."""
+        """Get a list of display tasks for the alias."""
         if not self.json["DisplayTasks"]:
             return []
         return [DisplayTaskAlias(dt, self._api) for dt in self.json["DisplayTasks"]]
@@ -106,19 +108,19 @@

Source code for evergreen.alias

   

Quick search

- +
diff --git a/_modules/evergreen/api.html b/_modules/evergreen/api.html index beea807e..c553e31b 100644 --- a/_modules/evergreen/api.html +++ b/_modules/evergreen/api.html @@ -1,17 +1,19 @@ - + - evergreen.api — evergreen.py 3.6.19 documentation - - - + evergreen.api — evergreen.py 3.6.20 documentation + + + + + @@ -114,7 +116,7 @@

Source code for evergreen.api

 
 
 
[docs]class EvergreenApi(object): - """Base methods for building API objects.""" + """Base methods for building API objects.""" def __init__( self, @@ -125,7 +127,7 @@

Source code for evergreen.api

         log_on_error: bool = False,
         use_default_logger_factory: bool = True,
     ) -> None:
-        """
+        """
         Create a _BaseEvergreenApi object.
 
         :param api_server: URI of Evergreen API server.
@@ -146,7 +148,7 @@ 

Source code for evergreen.api

 
 
[docs] @contextmanager def with_session(self) -> Generator["EvergreenApi", None, None]: - """Yield an instance of the API client with a shared session.""" + """Yield an instance of the API client with a shared session.""" session = self._create_session() evg_api = EvergreenApi( self._api_server, self._auth, self._timeout, session, self._log_on_error @@ -155,7 +157,7 @@

Source code for evergreen.api

 
     @property
     def session(self) -> requests.Session:
-        """
+        """
         Get the shared session if it exists, else create a new session.
 
         :return: Session to query the API with.
@@ -166,7 +168,7 @@ 

Source code for evergreen.api

         return self._create_session()
 
     def _create_session(self) -> requests.Session:
-        """Create a new session to query the API with."""
+        """Create a new session to query the API with."""
         session = requests.Session()
         adapter = requests.adapters.HTTPAdapter()
         session.mount(f"{urlparse(self._api_server).scheme}://", adapter)
@@ -176,7 +178,7 @@ 

Source code for evergreen.api

         return session
 
     def _create_url(self, endpoint: str) -> str:
-        """
+        """
         Format a call to a v2 REST API endpoint.
 
         :param endpoint: endpoint to call.
@@ -185,7 +187,7 @@ 

Source code for evergreen.api

         return f"{self._api_server}/rest/v2{endpoint}"
 
     def _create_plugin_url(self, endpoint: str) -> str:
-        """
+        """
         Format the a call to a plugin endpoint.
 
         :param endpoint: endpoint to call.
@@ -195,7 +197,7 @@ 

Source code for evergreen.api

 
     @staticmethod
     def _log_api_call_time(response: requests.Response, start_time: float) -> None:
-        """
+        """
         Log how long the api call took.
 
         :param response: Response from API.
@@ -208,9 +210,13 @@ 

Source code for evergreen.api

             LOGGER.debug("Request completed.", url=response.request.url, duration=duration)
 
     def _call_api(
-        self, url: str, params: Dict = None, method: str = "GET", data: Optional[str] = None
+        self,
+        url: str,
+        params: Optional[Dict] = None,
+        method: str = "GET",
+        data: Optional[str] = None,
     ) -> requests.Response:
-        """
+        """
         Make a call to the evergreen api.
 
         :param url: Url of call to make.
@@ -253,7 +259,7 @@ 

Source code for evergreen.api

         chunk_size: Optional[int] = None,
         is_binary: bool = False,
     ) -> Iterable:
-        """
+        """
         Make a streaming call based on if artifact is binary or nonbinary.
 
         :param url: url to call
@@ -275,7 +281,7 @@ 

Source code for evergreen.api

                     yield line
 
     def _raise_for_status(self, response: requests.Response) -> None:
-        """
+        """
         Raise an exception with the evergreen message if it exists.
 
         :param response: response from evergreen api.
@@ -299,9 +305,9 @@ 

Source code for evergreen.api

         response.raise_for_status()
 
     def _paginate(
-        self, url: str, params: Dict = None
+        self, url: str, params: Optional[Dict] = None
     ) -> Union[List[Dict[str, Any]], Dict[str, Any]]:
-        """
+        """
         Paginate until all results are returned and return a list of all JSON results.
 
         :param url: url to make request to.
@@ -319,8 +325,8 @@ 

Source code for evergreen.api

 
         return json_data
 
-    def _lazy_paginate(self, url: str, params: Dict = None) -> Iterable:
-        """
+    def _lazy_paginate(self, url: str, params: Optional[Dict] = None) -> Iterable:
+        """
         Lazy paginate, the results are returned lazily.
 
         :param url: URL to query.
@@ -345,8 +351,8 @@ 

Source code for evergreen.api

 
             next_url = response.links["next"]["url"]
 
-    def _lazy_paginate_by_date(self, url: str, params: Dict = None) -> Iterable:
-        """
+    def _lazy_paginate_by_date(self, url: str, params: Optional[Dict] = None) -> Iterable:
+        """
         Paginate based on date, the results are returned lazily.
 
         :param url: URL to query.
@@ -367,7 +373,7 @@ 

Source code for evergreen.api

             params["start_at"] = evergreen_input_to_output(data[-1]["create_time"])
 
 
[docs] def all_distros(self) -> List[Distro]: - """ + """ Get all distros in evergreen. :return: List of all distros in evergreen. @@ -377,7 +383,7 @@

Source code for evergreen.api

         return [Distro(distro, self) for distro in distro_list]  # type: ignore[arg-type]
[docs] def all_hosts(self, status: Optional[str] = None) -> List[Host]: - """ + """ Get all hosts in evergreen. :param status: Only return hosts with specified status. @@ -392,7 +398,7 @@

Source code for evergreen.api

         return [Host(host, self) for host in host_list]  # type: ignore[arg-type]
[docs] def host_by_id(self, host_id: str) -> Host: - """ + """ Get evergreen host by id. :param host_id: host ids, 'i-000cba730e92eb85b' @@ -404,7 +410,7 @@

Source code for evergreen.api

 
[docs] def configure_task( self, task_id: str, activated: Optional[bool] = None, priority: Optional[int] = None ) -> None: - """ + """ Update a task. :param task_id: Id of the task to update @@ -420,7 +426,7 @@

Source code for evergreen.api

         self._call_api(url, data=json.dumps(data), method="PATCH")
[docs] def restart_task(self, task_id: str) -> None: - """ + """ Restart a task. :param task_id: Id of the task to restart @@ -429,7 +435,7 @@

Source code for evergreen.api

         self._call_api(url, method="POST")
[docs] def abort_task(self, task_id: str) -> None: - """ + """ Abort a task. :param task_id: Id of the task to abort @@ -438,7 +444,7 @@

Source code for evergreen.api

         self._call_api(url, method="POST")
[docs] def all_projects(self, project_filter_fn: Optional[Callable] = None) -> List[Project]: - """ + """ Get all projects in evergreen. :param project_filter_fn: function to filter projects, should accept a project_id argument. @@ -452,7 +458,7 @@

Source code for evergreen.api

         return projects
[docs] def project_by_id(self, project_id: str) -> Project: - """ + """ Get a project by project_id. :param project_id: Id of project to query. @@ -464,7 +470,7 @@

Source code for evergreen.api

 
[docs] def recent_versions_by_project( self, project_id: str, params: Optional[Dict] = None ) -> RecentVersions: - """ + """ Get recent versions created in specified project. :param project_id: Id of project to query. @@ -478,7 +484,7 @@

Source code for evergreen.api

 
[docs] def send_slack_message( self, target: str, msg: str, attachments: Optional[List[SlackAttachment]] = None ) -> None: - """ + """ Send a Slack message to a user or channel in Slack. :param target: The slack name of the user or channel to send the message to. @@ -507,7 +513,7 @@

Source code for evergreen.api

         is_plain_text: Optional[bool] = None,
         headers: Optional[Dict[str, List[str]]] = None,
     ) -> None:
-        """
+        """
         Send an email to a user.
 
         :param recipients: Who to send the email to.
@@ -538,7 +544,7 @@ 

Source code for evergreen.api

 
[docs] def alias_for_version( self, version_id: str, alias: str, include_deps: bool = False ) -> List[VariantAlias]: - """ + """ Get the tasks and variants that an alias would select for an evergreen version. :param version_id: Evergreen version to query against. @@ -563,7 +569,7 @@

Source code for evergreen.api

         revision_start: Optional[int] = None,
         revision_end: Optional[int] = None,
     ) -> Iterator[Version]:
-        """
+        """
         Get the versions created in the specified project.
 
         :param project_id: Id of project to query.
@@ -595,7 +601,7 @@ 

Source code for evergreen.api

         requester: Requester = Requester.GITTER_REQUEST,
         time_attr: str = "create_time",
     ) -> Iterable[Version]:
-        """
+        """
         Get an iterator over the patches for the given time window.
 
         :param project_id: Id of project to query.
@@ -609,8 +615,8 @@ 

Source code for evergreen.api

             self.versions_by_project(project_id, requester), before, after, time_attr
         )
-
[docs] def patches_by_project(self, project_id: str, params: Dict = None) -> Iterable[Patch]: - """ +
[docs] def patches_by_project(self, project_id: str, params: Optional[Dict] = None) -> Iterable[Patch]: + """ Get a list of patches for the specified project. :param project_id: Id of project to query. @@ -624,7 +630,7 @@

Source code for evergreen.api

 
[docs] def update_patch_status( self, patch_id: str, activated: Optional[bool] = None, priority: Optional[int] = None ) -> None: - """ + """ Update a patch and set its status. :param patch_id: Id of the patch to update @@ -645,7 +651,7 @@

Source code for evergreen.api

         variants: List[Dict[str, Union[str, List[str]]]],
         description: Optional[str] = None,
     ) -> None:
-        """
+        """
         Update a patch.
 
         :param patch_id: Id of the patch to update
@@ -668,10 +674,10 @@ 

Source code for evergreen.api

         project_id: str,
         before: datetime,
         after: datetime,
-        params: Dict = None,
+        params: Optional[Dict] = None,
         time_attr: str = "create_time",
     ) -> Iterable[Patch]:
-        """
+        """
         Get an iterator over the patches for the given time window.
 
         :param project_id: Id of project to query.
@@ -688,7 +694,7 @@ 

Source code for evergreen.api

 
[docs] def patches_by_user( self, user_id: str, start_at: Optional[datetime] = None, limit: Optional[int] = None ) -> Iterable[Patch]: - """ + """ Get an iterable of recent patches by the given user. :param user_id: Id of user to query. @@ -704,7 +710,7 @@

Source code for evergreen.api

         return (Patch(patch, self) for patch in self._lazy_paginate(url, params))
[docs] def commit_queue_for_project(self, project_id: str) -> CommitQueue: - """ + """ Get the current commit queue for the specified project. :param project_id: Id of project to query. @@ -727,7 +733,7 @@

Source code for evergreen.api

         group_by: Optional[str] = None,
         sort: Optional[str] = None,
     ) -> List[TestStats]:
-        """
+        """
         Get a patch by patch id.
 
         :param project_id: Id of patch to query for.
@@ -768,7 +774,7 @@ 

Source code for evergreen.api

         return [TestStats(test_stat, self) for test_stat in test_stats_list]  # type: ignore[arg-type]
[docs] def tasks_by_project(self, project_id: str, statuses: Optional[List[str]] = None) -> List[Task]: - """ + """ Get all the tasks for a project. :param project_id: The project's id. @@ -782,7 +788,7 @@

Source code for evergreen.api

 
[docs] def tasks_by_project_and_commit( self, project_id: str, commit_hash: str, params: Optional[Dict] = None ) -> List[Task]: - """ + """ Get all the tasks for a revision in specified project. :param project_id: Project id associated with the revision @@ -801,7 +807,7 @@

Source code for evergreen.api

         num_versions: Optional[int] = None,
         start_at: Optional[int] = None,
     ) -> List[Task]:
-        """
+        """
         Get all the tasks for a project by task name.
 
         :param project_id: Id of project to query.
@@ -835,7 +841,7 @@ 

Source code for evergreen.api

         group_by: Optional[str] = None,
         sort: Optional[str] = None,
     ) -> List[TaskStats]:
-        """
+        """
         Get task stats by project id.
 
         :param project_id: Id of patch to query for.
@@ -885,7 +891,7 @@ 

Source code for evergreen.api

         group_by: Optional[str] = None,
         sort: Optional[str] = None,
     ) -> List[TaskReliability]:
-        """
+        """
         Get task reliability scores.
 
         :param project_id: Id of patch to query for.
@@ -927,7 +933,7 @@ 

Source code for evergreen.api

         ]
[docs] def build_by_id(self, build_id: str) -> Build: - """ + """ Get a build by id. :param build_id: build id to query. @@ -939,7 +945,7 @@

Source code for evergreen.api

 
[docs] def tasks_by_build( self, build_id: str, fetch_all_executions: Optional[bool] = None ) -> List[Task]: - """ + """ Get all tasks for a given build. :param build_id: build_id to query. @@ -955,7 +961,7 @@

Source code for evergreen.api

         return [Task(task, self) for task in task_list]  # type: ignore[arg-type]
[docs] def version_by_id(self, version_id: str) -> Version: - """ + """ Get version by version id. :param version_id: Id of version to query. @@ -965,7 +971,7 @@

Source code for evergreen.api

         return Version(self._paginate(url), self)  # type: ignore[arg-type]
[docs] def builds_by_version(self, version_id: str, params: Optional[Dict] = None) -> List[Build]: - """ + """ Get all builds for a given Evergreen version_id. :param version_id: Version Id to query for. @@ -976,8 +982,8 @@

Source code for evergreen.api

         build_list = self._paginate(url, params)
         return [Build(build, self) for build in build_list]  # type: ignore[arg-type]
-
[docs] def patch_by_id(self, patch_id: str, params: Dict = None) -> Patch: - """ +
[docs] def patch_by_id(self, patch_id: str, params: Optional[Dict] = None) -> Patch: + """ Get a patch by patch id. :param patch_id: Id of patch to query for. @@ -988,7 +994,7 @@

Source code for evergreen.api

         return Patch(self._call_api(url, params).json(), self)  # type: ignore[arg-type]
[docs] def get_patch_diff(self, patch_id: str) -> str: - """ + """ Get the diff for a given patch. :param patch_id: The id of the patch to request the diff for. @@ -1000,7 +1006,7 @@

Source code for evergreen.api

     def _execute_patch_file_command(
         self, command: str, author: Optional[str] = None
     ) -> PatchCreationDetails:
-        """
+        """
         Execute a patch file command.
 
         :param command: The command
@@ -1035,7 +1041,7 @@ 

Source code for evergreen.api

         variant: str,
         author: Optional[str] = None,
     ) -> PatchCreationDetails:
-        """
+        """
         Start a patch build based on a patch.
 
         :param diff_file_path: The path to the diff.
@@ -1063,7 +1069,7 @@ 

Source code for evergreen.api

         variant: str,
         author: Optional[str] = None,
     ) -> PatchCreationDetails:
-        """
+        """
         Start a patch build based on a diff.
 
         :param patch_id: The patch_id to base this build on.
@@ -1087,7 +1093,7 @@ 

Source code for evergreen.api

         fetch_all_executions: Optional[bool] = None,
         execution: Optional[int] = None,
     ) -> Task:
-        """
+        """
         Get a task by task_id.
 
         :param task_id: Id of task to query for.
@@ -1106,7 +1112,7 @@ 

Source code for evergreen.api

 
[docs] def tests_by_task( self, task_id: str, status: Optional[str] = None, execution: Optional[int] = None ) -> List[Tst]: - """ + """ Get all tests for a given task. :param task_id: Id of task to query for. @@ -1123,7 +1129,7 @@

Source code for evergreen.api

         return [Tst(test, self) for test in self._paginate(url, params)]  # type: ignore[arg-type]
[docs] def single_test_by_task_and_test_file(self, task_id: str, test_file: str) -> List[Tst]: - """ + """ Get a test for a given task. :param task_id: Id of task to query for. @@ -1135,7 +1141,7 @@

Source code for evergreen.api

         return [Tst(test, self) for test in self._call_api(url, params=param).json()]
[docs] def num_of_tests_by_task(self, task_id: str) -> int: - """ + """ Get the number of tests that ran as part of the given task. :param task_id: Id of task to query for. @@ -1145,7 +1151,7 @@

Source code for evergreen.api

         return int(self._call_api(url).text)
[docs] def manifest_for_task(self, task_id: str) -> Optional[Manifest]: - """ + """ Get the manifest for the given task. :param task_id: Task Id fo query. @@ -1168,7 +1174,7 @@

Source code for evergreen.api

         execution: Optional[int] = None,
         fetch_all_executions: Optional[bool] = None,
     ) -> List[TaskAnnotation]:
-        """
+        """
         Get the task annotations for the given task.
 
         :param task_id: Id of task to query.
@@ -1194,7 +1200,7 @@ 

Source code for evergreen.api

 
[docs] def file_ticket_for_task( self, task_id: str, execution: int, ticket_link: str, ticket_key: str ) -> None: - """ + """ Update an Evergreen task with information about a ticket created from it. :param task_id: The id of the task to update. @@ -1219,7 +1225,7 @@

Source code for evergreen.api

         metadata: Optional[Dict[str, Any]] = None,
         metadata_links: Optional[List[MetadataLinkRequest]] = None,
     ) -> None:
-        """
+        """
         Annotate the specified task.
 
         :param task_id: ID of task to annotate.
@@ -1256,7 +1262,7 @@ 

Source code for evergreen.api

         self._call_api(url, method="PUT", data=json.dumps(request))
[docs] def performance_results_by_task(self, task_id: str) -> PerformanceData: - """ + """ Get the 'perf.json' performance results for a given task_id. :param task_id: Id of task to query for. @@ -1268,7 +1274,7 @@

Source code for evergreen.api

 
[docs] def performance_results_by_task_name( self, task_id: str, task_name: str ) -> List[PerformanceData]: - """ + """ Get the 'perf.json' performance results for a given task_id and task_name. :param task_id: Id of task to query for. @@ -1279,7 +1285,7 @@

Source code for evergreen.api

         return [PerformanceData(result, self) for result in self._paginate(url)]  # type: ignore[arg-type]
[docs] def json_by_task(self, task_id: str, json_key: str) -> Dict[str, Any]: - """ + """ Get the json reported for task {task_id} using the key {json_key}. :param task_id: Id of task to query for. @@ -1292,7 +1298,7 @@

Source code for evergreen.api

 
[docs] def json_history_for_task( self, task_id: str, task_name: str, json_key: str ) -> List[Dict[str, Any]]: - """ + """ Get the history of json reported for task {task_id} using the key {json_key}. :param task_id: Id of task to query for. @@ -1304,7 +1310,7 @@

Source code for evergreen.api

         return cast(List[Dict[str, Any]], self._paginate(url))
def _create_old_url(self, endpoint: str) -> str: - """ + """ Build a url for an pre-v2 endpoint. :param endpoint: endpoint to build url for. @@ -1313,7 +1319,7 @@

Source code for evergreen.api

         return f"{self._api_server}/{endpoint}"
 
 
[docs] def manifest(self, project_id: str, revision: str) -> Manifest: - """ + """ Get the manifest for the given revision. :param project_id: Project the revision belongs to. @@ -1324,7 +1330,7 @@

Source code for evergreen.api

         return Manifest(self._call_api(url).json(), self)  # type: ignore[arg-type]
[docs] def retrieve_task_log(self, log_url: str, raw: bool = False) -> str: - """ + """ Get the request log file from a task. :param log_url: URL of log to retrieve. @@ -1337,7 +1343,7 @@

Source code for evergreen.api

         return self._call_api(log_url, params=params).text
[docs] def stream_log(self, log_url: str) -> Iterable: - """ + """ Stream the given log url as a python generator. :param log_url: URL of log file to stream. @@ -1347,7 +1353,7 @@

Source code for evergreen.api

         return self._stream_api(log_url, params)
[docs] def permissions_for_user(self, user_id: str) -> List[ResourceTypePermissions]: - """ + """ Get the permissions a user has on evergreen resources. :param user_id: Id of the user whose permissions to get. @@ -1364,7 +1370,7 @@

Source code for evergreen.api

         resources: List[str],
         permissions: Dict[str, int],
     ) -> None:
-        """
+        """
         Grant a user permissions to evergreen resources.
 
         :param user_id: Id of the user to give permissions to.
@@ -1382,7 +1388,7 @@ 

Source code for evergreen.api

         self._call_api(url, method="POST", data=json.dumps(payload))
[docs] def give_roles_to_user(self, user_id: str, roles: List[str], create_user: bool = False) -> None: - """ + """ Add the specified role to the specified user. :param user_id: Id of the user to give the roles to. @@ -1400,7 +1406,7 @@

Source code for evergreen.api

 
[docs] def delete_user_permissions( self, user_id: str, resource_type: RemovablePermission, resource_id: Optional[str] = None ) -> None: - """ + """ Delete all permissions of a given type for a user. :param user_id: Id of the user whose permissions to remove. @@ -1415,7 +1421,7 @@

Source code for evergreen.api

         self._call_api(url, method="DELETE", data=json.dumps(payload))
[docs] def get_users_for_role(self, role: str) -> UsersForRole: - """ + """ Get a list of users having an evergreen role. :param role: Role to fetch users for. @@ -1426,7 +1432,7 @@

Source code for evergreen.api

 
[docs] def all_user_permissions_for_resource( self, resource_id: str, resource_type: PermissionableResourceType ) -> Dict[str, Dict[str, int]]: - """ + """ Get all users with their permissions to the resource. The returned dict has the following structure - @@ -1462,7 +1468,7 @@

Source code for evergreen.api

         timeout: Optional[int] = DEFAULT_NETWORK_TIMEOUT_SEC,
         log_on_error: bool = False,
     ) -> "EvergreenApi":
-        """
+        """
         Get an evergreen api instance based on config file settings.
 
         :param auth: EvgAuth with authentication to use.
@@ -1511,7 +1517,7 @@ 

Source code for evergreen.api

 
 
 
[docs]class CachedEvergreenApi(EvergreenApi): - """Access to the Evergreen API server that caches certain calls.""" + """Access to the Evergreen API server that caches certain calls.""" def __init__( self, @@ -1520,14 +1526,14 @@

Source code for evergreen.api

         timeout: Optional[int] = None,
         log_on_error: bool = False,
     ) -> None:
-        """Create an Evergreen Api object."""
+        """Create an Evergreen Api object."""
         super(CachedEvergreenApi, self).__init__(
             api_server, auth, timeout, log_on_error=log_on_error
         )
 
 
[docs] @lru_cache(maxsize=CACHE_SIZE) def build_by_id(self, build_id: str) -> Build: # type: ignore[override] - """ + """ Get a build by id. :param build_id: build id to query. @@ -1537,7 +1543,7 @@

Source code for evergreen.api

 
 
[docs] @lru_cache(maxsize=CACHE_SIZE) def version_by_id(self, version_id: str) -> Version: # type: ignore[override] - """ + """ Get version by version id. :param version_id: Id of version to query. @@ -1546,7 +1552,7 @@

Source code for evergreen.api

         return super(CachedEvergreenApi, self).version_by_id(version_id)
[docs] def clear_caches(self) -> None: - """Clear the cache.""" + """Clear the cache.""" cached_functions = [ self.build_by_id, self.version_by_id, @@ -1556,7 +1562,7 @@

Source code for evergreen.api

 
 
 
[docs]class RetryingEvergreenApi(EvergreenApi): - """An Evergreen Api that retries failed calls.""" + """An Evergreen Api that retries failed calls.""" def __init__( self, @@ -1565,7 +1571,7 @@

Source code for evergreen.api

         timeout: Optional[int] = None,
         log_on_error: bool = False,
     ) -> None:
-        """Create an Evergreen Api object."""
+        """Create an Evergreen Api object."""
         super(RetryingEvergreenApi, self).__init__(
             api_server, auth, timeout, log_on_error=log_on_error
         )
@@ -1579,9 +1585,13 @@ 

Source code for evergreen.api

         reraise=True,
     )
     def _call_api(
-        self, url: str, params: Dict = None, method: str = "GET", data: Optional[str] = None
+        self,
+        url: str,
+        params: Optional[Dict] = None,
+        method: str = "GET",
+        data: Optional[str] = None,
     ) -> requests.Response:
-        """
+        """
         Call into the evergreen api.
 
         :param url: Url to call.
@@ -1609,19 +1619,19 @@ 

Source code for evergreen.api

   

Quick search

- +
diff --git a/_modules/evergreen/api_requests.html b/_modules/evergreen/api_requests.html index 66d1e3a3..1bc8a556 100644 --- a/_modules/evergreen/api_requests.html +++ b/_modules/evergreen/api_requests.html @@ -1,17 +1,19 @@ - + - evergreen.api_requests — evergreen.py 3.6.19 documentation - - - + evergreen.api_requests — evergreen.py 3.6.20 documentation + + + + + @@ -49,14 +51,14 @@

Source code for evergreen.api_requests

 
 
 
[docs]class IssueLinkRequest(NamedTuple): - """Issue to add to a task annotation.""" + """Issue to add to a task annotation.""" issue_key: str url: str confidence_score: Optional[float] = None
[docs] def as_dict(self) -> Dict[str, Any]: - """Get a dictionary representation of the issue link.""" + """Get a dictionary representation of the issue link.""" data: Dict[str, Any] = {"issue_key": self.issue_key, "url": self.url} if self.confidence_score is not None: data["confidence_score"] = self.confidence_score @@ -64,14 +66,14 @@

Source code for evergreen.api_requests

 
 
 
[docs]class MetadataLinkRequest(NamedTuple): - """Metadata Link to add to a task annotation.""" + """Metadata Link to add to a task annotation.""" url: str text: str
[docs]class SlackAttachmentField(BaseModel): - """ + """ Slack fields that get displayed in a table-like format. title: The field title. @@ -86,7 +88,7 @@

Source code for evergreen.api_requests

 
 
 
[docs]class SlackAttachment(BaseModel): - """ + """ An attachment to be sent using Slack. title: The attachment title. @@ -103,15 +105,15 @@

Source code for evergreen.api_requests

     fields: Array of SlackAttachmentFields that get displayed in a table-like format.
     """
 
-    title: Optional[str]
-    title_link: Optional[str]
-    text: Optional[str]
-    fallback: Optional[str]
-    mrkdwn_in: Optional[List[str]]
-    color: Optional[str]
-    author_name: Optional[str]
-    author_icon: Optional[str]
-    fields: Optional[List[SlackAttachmentField]]
+ title: Optional[str] = None + title_link: Optional[str] = None + text: Optional[str] = None + fallback: Optional[str] = None + mrkdwn_in: Optional[List[str]] = None + color: Optional[str] = None + author_name: Optional[str] = None + author_icon: Optional[str] = None + fields: Optional[List[SlackAttachmentField]] = None
@@ -130,19 +132,19 @@

Source code for evergreen.api_requests

   

Quick search

- +
diff --git a/_modules/evergreen/base.html b/_modules/evergreen/base.html index d91d3bd2..730a2c35 100644 --- a/_modules/evergreen/base.html +++ b/_modules/evergreen/base.html @@ -1,17 +1,19 @@ - + - evergreen.base — evergreen.py 3.6.19 documentation - - - + evergreen.base — evergreen.py 3.6.20 documentation + + + + + @@ -59,7 +61,7 @@

Source code for evergreen.base

 
 
 
[docs]def evg_attrib(attrib_name: str, type_fn: Optional[Callable] = None) -> property: - """ + """ Create an attribute for the given evergreen property. This creates an attribute for the class that looks up the value via json. It is used to @@ -81,7 +83,7 @@

Source code for evergreen.base

 
 
 
[docs]def evg_datetime_attrib(attrib_name: str) -> property: - """ + """ Create a datetime attribute for the given evergreen property. :param attrib_name: Name of attribute. @@ -90,7 +92,7 @@

Source code for evergreen.base

 
 
 
[docs]def evg_short_datetime_attrib(attrib_name: str) -> property: - """ + """ Create a shortened datetime attribute for the given evergreen property. :param attrib_name: Name of attribute. @@ -99,7 +101,7 @@

Source code for evergreen.base

 
 
 
[docs]def evg_date_attrib(attrib_name: str) -> property: - """ + """ Create a date attribute for the given evergreen property. :param attrib_name: Name of attribute. @@ -108,16 +110,16 @@

Source code for evergreen.base

 
 
 class _BaseEvergreenObject(object):
-    """Common evergreen object."""
+    """Common evergreen object."""
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """Create an instance of an evergreen task."""
+        """Create an instance of an evergreen task."""
         self.json = json
         self._api = api
         self._date_fields = None
 
     def _is_field_a_date(self, item: str) -> bool:
-        """
+        """
         Determine if given field is a date.
 
         :param item: field to check.
@@ -126,7 +128,7 @@ 

Source code for evergreen.base

         return bool(self._date_fields and item in self._date_fields and self.json[item])
 
     def __getattr__(self, item: str) -> Any:
-        """Lookup an attribute if it exists."""
+        """Lookup an attribute if it exists."""
         if item != "json" and item in self.json:
             if self._is_field_a_date(item):
                 return parse_evergreen_datetime(self.json[item])
@@ -158,19 +160,19 @@ 

Source code for evergreen.base

   

Quick search

- +
diff --git a/_modules/evergreen/build.html b/_modules/evergreen/build.html index 7ad6fbe2..f43f45c8 100644 --- a/_modules/evergreen/build.html +++ b/_modules/evergreen/build.html @@ -1,17 +1,19 @@ - + - evergreen.build — evergreen.py 3.6.19 documentation - - - + evergreen.build — evergreen.py 3.6.20 documentation + + + + + @@ -67,7 +69,7 @@

Source code for evergreen.build

 
 
 
[docs]class StatusCounts(_BaseEvergreenObject): - """Representation of Evergreen StatusCounts.""" + """Representation of Evergreen StatusCounts.""" succeeded = evg_attrib("succeeded") failed = evg_attrib("failed") @@ -78,7 +80,7 @@

Source code for evergreen.build

     timed_out = evg_attrib("timed_out")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create a Status Counts object.
 
         :param json: Json of status counts object.
@@ -88,7 +90,7 @@ 

Source code for evergreen.build

 
 
 
[docs]class Build(_BaseEvergreenObject): - """Representation of an Evergreen build.""" + """Representation of an Evergreen build.""" id = evg_attrib("_id") project_id = evg_attrib("project_id") @@ -113,7 +115,7 @@

Source code for evergreen.build

     origin = evg_attrib("origin")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of an evergreen task.
 
         :param json: Json of build object.
@@ -123,11 +125,11 @@ 

Source code for evergreen.build

 
     @property
     def status_counts(self) -> StatusCounts:
-        """Get the status counts of the build."""
+        """Get the status counts of the build."""
         return StatusCounts(self.json["status_counts"], self._api)
 
 
[docs] def get_project_identifier(self) -> str: - """ + """ Return the human-readable project id. Can also be accessed as an attribute. :return: Human-readable project id. @@ -135,7 +137,7 @@

Source code for evergreen.build

         return self.project_identifier
[docs] def get_tasks(self, fetch_all_executions: bool = False) -> List["Task"]: - """ + """ Get all tasks for this build. :param fetch_all_executions: fetch all executions for tasks. @@ -144,15 +146,15 @@

Source code for evergreen.build

         return self._api.tasks_by_build(self.id, fetch_all_executions)
[docs] def is_completed(self) -> bool: - """ + """ Determine if this build has completed running tasks. :return: True if build has completed running tasks. """ return self.status in COMPLETED_STATES
-
[docs] def get_metrics(self, task_filter_fn: Callable = None) -> Optional[BuildMetrics]: - """ +
[docs] def get_metrics(self, task_filter_fn: Optional[Callable] = None) -> Optional[BuildMetrics]: + """ Get metrics for the build. Metrics are only available on build that have finished running.. @@ -166,7 +168,7 @@

Source code for evergreen.build

         return None
[docs] def get_version(self) -> "Version": - """ + """ Get the version this build is a part of. :return: Version that this build is a part of. @@ -174,7 +176,7 @@

Source code for evergreen.build

         return self._api.version_by_id(self.version)
def __repr__(self) -> str: - """ + """ Get a string representation of Task for debugging purposes. :return: String representation of Task. @@ -198,19 +200,19 @@

Source code for evergreen.build

   

Quick search

- +
diff --git a/_modules/evergreen/commitqueue.html b/_modules/evergreen/commitqueue.html index 30b6bbf8..8991df25 100644 --- a/_modules/evergreen/commitqueue.html +++ b/_modules/evergreen/commitqueue.html @@ -1,17 +1,19 @@ - + - evergreen.commitqueue — evergreen.py 3.6.19 documentation - - - + evergreen.commitqueue — evergreen.py 3.6.20 documentation + + + + + @@ -55,13 +57,13 @@

Source code for evergreen.commitqueue

 
 
 
[docs]class CommitQueueItem(_BaseEvergreenObject): - """Representation of an entry in a commit queue.""" + """Representation of an entry in a commit queue.""" issue = evg_attrib("issue") modules = evg_attrib("modules") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """ + """ Create a CommitQueueItem object. :param json: Commit queue item json. @@ -71,12 +73,12 @@

Source code for evergreen.commitqueue

 
 
 
[docs]class CommitQueue(_BaseEvergreenObject): - """Representation of a commit queue from evergreen.""" + """Representation of a commit queue from evergreen.""" queue_id = evg_attrib("queue_id") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """ + """ Create an instance of a commit queue from evergreen json. :param json: Evergreen json representation of commit queue. @@ -86,7 +88,7 @@

Source code for evergreen.commitqueue

 
     @property
     def queue(self) -> List[CommitQueueItem]:
-        """
+        """
         Retrieve the queue for this commit queue.
 
         :return: Queue of commits in the commit queue.
@@ -112,19 +114,19 @@ 

Source code for evergreen.commitqueue

   

Quick search

- +
diff --git a/_modules/evergreen/config.html b/_modules/evergreen/config.html index 8ba9a470..8e74df2d 100644 --- a/_modules/evergreen/config.html +++ b/_modules/evergreen/config.html @@ -1,17 +1,19 @@ - + - evergreen.config — evergreen.py 3.6.19 documentation - - - + evergreen.config — evergreen.py 3.6.20 documentation + + + + + @@ -63,7 +65,7 @@

Source code for evergreen.config

 
 
 
[docs]def read_evergreen_from_file(filename: str) -> Dict: - """ + """ Read evergreen config from given filename. :param filename: Filename to read config. @@ -74,7 +76,7 @@

Source code for evergreen.config

 
 
 
[docs]def read_evergreen_config() -> Optional[Dict]: - """ + """ Search known location for the evergreen config file. :return: First found evergreen configuration. @@ -85,7 +87,7 @@

Source code for evergreen.config

 
 
 
[docs]def get_auth_from_config(config: Dict) -> EvgAuth: - """ + """ Get the evergreen authentication from the specified config dict. :param config: Evergreen configuration. @@ -95,7 +97,7 @@

Source code for evergreen.config

 
 
 
[docs]def get_auth() -> Optional[EvgAuth]: - """ + """ Get the evergreen authentication object from the default locations. Convenience function. :return: Authentication information for evergreen. @@ -122,19 +124,19 @@

Source code for evergreen.config

   

Quick search

- +
diff --git a/_modules/evergreen/distro.html b/_modules/evergreen/distro.html index ddd551b8..78a621e9 100644 --- a/_modules/evergreen/distro.html +++ b/_modules/evergreen/distro.html @@ -1,17 +1,19 @@ - + - evergreen.distro — evergreen.py 3.6.19 documentation - - - + evergreen.distro — evergreen.py 3.6.20 documentation + + + + + @@ -60,14 +62,14 @@

Source code for evergreen.distro

 
 
 
[docs]class MountPoint(_BaseEvergreenObject): - """Representation of Mount Point in distro settings.""" + """Representation of Mount Point in distro settings.""" device_name = evg_attrib("device_name") size = evg_attrib("size") virtual_name = evg_attrib("virtual_name") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """ + """ Create an instance of the mount point. :param json: Json of mount point. @@ -77,10 +79,10 @@

Source code for evergreen.distro

 
 
 
[docs]class StaticDistroSettings(_BaseEvergreenObject): - """Representation of Evergreen static distro settings.""" + """Representation of Evergreen static distro settings.""" def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """ + """ Create an instance of the distro settings for static images. :param json: Json of distro settings. @@ -90,7 +92,7 @@

Source code for evergreen.distro

 
     @property
     def hosts(self) -> List[str]:
-        """
+        """
         Retrieve Hosts of static distro.
 
         :return: hosts of static distro.
@@ -101,12 +103,12 @@ 

Source code for evergreen.distro

 
 
 
[docs]class DockerDistroSettings(_BaseEvergreenObject): - """Representation of docker distro settings.""" + """Representation of docker distro settings.""" image_url = evg_attrib("image_url") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """ + """ Create an instance of the distro settings for docker. :param json: Json of distro settings. @@ -116,7 +118,7 @@

Source code for evergreen.distro

 
 
 
[docs]class AwsDistroSettings(_BaseEvergreenObject): - """Representation of AWS Distro Settings.""" + """Representation of AWS Distro Settings.""" ami = evg_attrib("ami") aws_access_key_id = evg_attrib("aws_access_key_id") @@ -134,7 +136,7 @@

Source code for evergreen.distro

     vpc_name = evg_attrib("vpc_name")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of the distro settings.
 
         :param json: Json of the distro settings.
@@ -144,7 +146,7 @@ 

Source code for evergreen.distro

 
     @property
     def mount_points(self) -> List[MountPoint]:
-        """
+        """
         Retrieve list of mount points for the distro.
 
         :return: List of mount points.
@@ -155,7 +157,7 @@ 

Source code for evergreen.distro

 
 
 
[docs]class PlannerSettings(_BaseEvergreenObject): - """Representation of planner settings.""" + """Representation of planner settings.""" version = evg_attrib("version") minimum_hosts = evg_attrib("minimum_hosts") @@ -167,7 +169,7 @@

Source code for evergreen.distro

     task_ordering = evg_attrib("task_ordering")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of planner settings for a distro.
 
         :param json: planner settings json.
@@ -177,12 +179,12 @@ 

Source code for evergreen.distro

 
 
 
[docs]class FinderSettings(_BaseEvergreenObject): - """Representation of finder settings.""" + """Representation of finder settings.""" version = evg_attrib("version") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """ + """ Create an instance of finder settings for a distro. :param json: finder settings json. @@ -192,7 +194,7 @@

Source code for evergreen.distro

 
 
 
[docs]class Distro(_BaseEvergreenObject): - """Representation of an Evergreen Distro.""" + """Representation of an Evergreen Distro.""" _PROVIDER_MAP = { AWS_ON_DEMAND_PROVIDER: AwsDistroSettings, @@ -225,7 +227,7 @@

Source code for evergreen.distro

     container_pool = evg_attrib("container_pool")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of a distro.
 
         :param json: Json of a distro.
@@ -236,7 +238,7 @@ 

Source code for evergreen.distro

 
     @property
     def settings(self) -> Optional[Any]:
-        """
+        """
         Retrieve the settings for the distro.
 
         :return: settings for distro.
@@ -249,7 +251,7 @@ 

Source code for evergreen.distro

 
     @property
     def expansions(self) -> Optional[Dict[str, str]]:
-        """
+        """
         Retrieve dict of expansions for distro.
 
         :return: dict of expansions.
@@ -260,7 +262,7 @@ 

Source code for evergreen.distro

 
     @property
     def planner_settings(self) -> PlannerSettings:
-        """
+        """
         Retrieve planner settings for distro.
 
         :return: planner settings.
@@ -269,7 +271,7 @@ 

Source code for evergreen.distro

 
     @property
     def finder_settings(self) -> FinderSettings:
-        """
+        """
         Retrieve finder settings for distro.
 
         :return: finder settings.
@@ -293,19 +295,19 @@ 

Source code for evergreen.distro

   

Quick search

- +
diff --git a/_modules/evergreen/errors/exceptions.html b/_modules/evergreen/errors/exceptions.html index fe6a1803..94c8b840 100644 --- a/_modules/evergreen/errors/exceptions.html +++ b/_modules/evergreen/errors/exceptions.html @@ -1,17 +1,19 @@ - + - evergreen.errors.exceptions — evergreen.py 3.6.19 documentation - - - + evergreen.errors.exceptions — evergreen.py 3.6.20 documentation + + + + + @@ -50,10 +52,10 @@

Source code for evergreen.errors.exceptions

 
 
 
[docs]class EvergreenException(Exception): - """An exception coming from the evergreen client.""" + """An exception coming from the evergreen client.""" def __init__(self, msg: Optional[str] = None) -> None: - """ + """ Create a new exception instance. :param msg: Message describing exception. @@ -65,10 +67,10 @@

Source code for evergreen.errors.exceptions

 
 
 
[docs]class MetricsException(EvergreenException): - """An exception with metrics collection.""" + """An exception with metrics collection.""" def __init__(self, msg: Optional[str] = None) -> None: - """ + """ Create a new exception instance. :param msg: Message describing exception. @@ -80,10 +82,10 @@

Source code for evergreen.errors.exceptions

 
 
 
[docs]class ActiveTaskMetricsException(MetricsException): - """An exception when a task is in progress during metrics collection.""" + """An exception when a task is in progress during metrics collection.""" def __init__(self, task: "Task", msg: Optional[str] = None) -> None: - """ + """ Create a new exception instance. :param task: Task in progress. @@ -113,19 +115,19 @@

Source code for evergreen.errors.exceptions

   

Quick search

- +
diff --git a/_modules/evergreen/host.html b/_modules/evergreen/host.html index 9f852a10..a0c75358 100644 --- a/_modules/evergreen/host.html +++ b/_modules/evergreen/host.html @@ -1,17 +1,19 @@ - + - evergreen.host — evergreen.py 3.6.19 documentation - - - + evergreen.host — evergreen.py 3.6.20 documentation + + + + + @@ -57,14 +59,14 @@

Source code for evergreen.host

 
 
 
[docs]class HostDistro(_BaseEvergreenObject): - """Representation of a distro.""" + """Representation of a distro.""" distro_id = evg_attrib("distro_id") provider = evg_attrib("provider") image_id = evg_attrib("image_id") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """ + """ Create an instance of a distro. :param json: json of distro. @@ -74,7 +76,7 @@

Source code for evergreen.host

 
 
 
[docs]class RunningTask(_BaseEvergreenObject): - """Representation of a running task.""" + """Representation of a running task.""" task_id = evg_attrib("task_id") name = evg_attrib("name") @@ -83,7 +85,7 @@

Source code for evergreen.host

     build_id = evg_attrib("build_id")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of a Running Task.
 
         :param json: json of running task.
@@ -92,7 +94,7 @@ 

Source code for evergreen.host

         super(RunningTask, self).__init__(json, api)
 
 
[docs] def get_build(self) -> "Build": - """ + """ Get build for the running task. :return: build object for task. @@ -100,7 +102,7 @@

Source code for evergreen.host

         return self._api.build_by_id(self.build_id)
[docs] def get_version(self) -> "Version": - """ + """ Get version for the running task. :return: version object for task. @@ -109,7 +111,7 @@

Source code for evergreen.host

 
 
 
[docs]class Host(_BaseEvergreenObject): - """Representation of an Evergreen host.""" + """Representation of an Evergreen host.""" host_id = evg_attrib("host_id") host_url = evg_attrib("host_url") @@ -121,21 +123,21 @@

Source code for evergreen.host

     user_host = evg_attrib("user_host")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """Create an instance of an evergreen host."""
+        """Create an instance of an evergreen host."""
         super(Host, self).__init__(json, api)
 
     @property
     def running_task(self) -> RunningTask:
-        """Get the running task on this host."""
+        """Get the running task on this host."""
         return RunningTask(self.json["running_task"], self._api)
 
     @property
     def distro(self) -> HostDistro:
-        """Get the distro on this host."""
+        """Get the distro on this host."""
         return HostDistro(self.json["distro"], self._api)
 
 
[docs] def get_build(self) -> "Build": - """ + """ Get the build for the build using this host. :return: build for task running on this host. @@ -143,7 +145,7 @@

Source code for evergreen.host

         return self.running_task.get_build()
[docs] def get_version(self) -> "Version": - """ + """ Get the version for the task using this host. :return: version for task running on this host. @@ -151,7 +153,7 @@

Source code for evergreen.host

         return self.running_task.get_version()
def __str__(self) -> str: - """Get a human readable string version of this host.""" + """Get a human readable string version of this host.""" return "{host_id}: {distro_id} - {status}".format( host_id=self.host_id, distro_id=self.distro.distro_id, status=self.status )
@@ -173,19 +175,19 @@

Source code for evergreen.host

   

Quick search

- +
diff --git a/_modules/evergreen/manifest.html b/_modules/evergreen/manifest.html index 8a587ab4..3fed178e 100644 --- a/_modules/evergreen/manifest.html +++ b/_modules/evergreen/manifest.html @@ -1,17 +1,19 @@ - + - evergreen.manifest — evergreen.py 3.6.19 documentation - - - + evergreen.manifest — evergreen.py 3.6.20 documentation + + + + + @@ -54,7 +56,7 @@

Source code for evergreen.manifest

 
 
 
[docs]class ManifestModule(_BaseEvergreenObject): - """Represents a module in the evergreen manifest.""" + """Represents a module in the evergreen manifest.""" branch = evg_attrib("branch") repo = evg_attrib("repo") @@ -63,7 +65,7 @@

Source code for evergreen.manifest

     url = evg_attrib("url")
 
     def __init__(self, name: str, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of an evergreen manifest module.
 
         :param json: json representing manifest.
@@ -74,7 +76,7 @@ 

Source code for evergreen.manifest

 
 
 
[docs]class Manifest(_BaseEvergreenObject): - """Representation of an evergreen manifest.""" + """Representation of an evergreen manifest.""" id = evg_attrib("id") revision = evg_attrib("revision") @@ -82,7 +84,7 @@

Source code for evergreen.manifest

     branch = evg_attrib("branch")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of an evergreen version manifest.
 
         :param json: json representing manifest.
@@ -92,7 +94,7 @@ 

Source code for evergreen.manifest

 
     @property
     def modules(self) -> Optional[Dict[str, ManifestModule]]:
-        """Map of modules in this manifest."""
+        """Map of modules in this manifest."""
         if "modules" not in self.json:
             return {}
 
@@ -120,19 +122,19 @@ 

Source code for evergreen.manifest

   

Quick search

- +
diff --git a/_modules/evergreen/metrics/buildmetrics.html b/_modules/evergreen/metrics/buildmetrics.html index da5f681b..2b476f81 100644 --- a/_modules/evergreen/metrics/buildmetrics.html +++ b/_modules/evergreen/metrics/buildmetrics.html @@ -1,17 +1,19 @@ - + - evergreen.metrics.buildmetrics — evergreen.py 3.6.19 documentation - - - + evergreen.metrics.buildmetrics — evergreen.py 3.6.20 documentation + + + + + @@ -64,10 +66,10 @@

Source code for evergreen.metrics.buildmetrics

[docs]class BuildMetrics(object): - """Metrics about an evergreen build.""" + """Metrics about an evergreen build.""" def __init__(self, build: "Build") -> None: - """ + """ Create an instance of build metrics. :param build: Build to analyze. @@ -97,7 +99,7 @@

Source code for evergreen.metrics.buildmetrics

self._display_map: Dict[str, List[Task]] = defaultdict(list)

[docs] def calculate(self, task_filter_fn: Optional[Callable] = None) -> "BuildMetrics": - """ + """ Calculate metrics for the given build. :param task_filter_fn: function to filter tasks included for metrics, should accept a task @@ -121,7 +123,7 @@

Source code for evergreen.metrics.buildmetrics

@property def total_tasks(self) -> int: - """ + """ Get the total tasks in the build. :return: total tasks. @@ -130,7 +132,7 @@

Source code for evergreen.metrics.buildmetrics

@property def pct_tasks_success(self) -> float: - """ + """ Get the percentage of successful tasks. :return: Percentage of successful tasks. @@ -139,7 +141,7 @@

Source code for evergreen.metrics.buildmetrics

@property def pct_tasks_undispatched(self) -> float: - """ + """ Get the percentage of undispatched tasks. :return: Percentage of undispatched tasks. @@ -148,7 +150,7 @@

Source code for evergreen.metrics.buildmetrics

@property def pct_tasks_failed(self) -> float: - """ + """ Get the percentage of failed tasks. :return: Percentage of failed tasks. @@ -157,7 +159,7 @@

Source code for evergreen.metrics.buildmetrics

@property def pct_tasks_timed_out(self) -> float: - """ + """ Get the percentage of timeout tasks. :return: Percentage of timeout tasks. @@ -166,7 +168,7 @@

Source code for evergreen.metrics.buildmetrics

@property def pct_tasks_system_failure(self) -> float: - """ + """ Get the percentage of system failure tasks. :return: Percentage of system failure tasks. @@ -175,7 +177,7 @@

Source code for evergreen.metrics.buildmetrics

@property def total_display_tasks(self) -> int: - """ + """ Get the total display tasks in the build. :return: total display tasks. @@ -188,7 +190,7 @@

Source code for evergreen.metrics.buildmetrics

@property def pct_display_tasks_success(self) -> float: - """ + """ Get the percentage of successful display tasks. :return: Percentage of successful display tasks. @@ -197,7 +199,7 @@

Source code for evergreen.metrics.buildmetrics

@property def pct_display_tasks_undispatched(self) -> float: - """ + """ Get the percentage of undispatched display_tasks. :return: Percentage of undispatched display_tasks. @@ -206,7 +208,7 @@

Source code for evergreen.metrics.buildmetrics

@property def pct_display_tasks_failed(self) -> float: - """ + """ Get the percentage of failed display tasks. :return: Percentage of failed display tasks. @@ -215,7 +217,7 @@

Source code for evergreen.metrics.buildmetrics

@property def pct_display_tasks_timed_out(self) -> float: - """ + """ Get the percentage of timeout display tasks. :return: Percentage of timeout display tasks. @@ -224,7 +226,7 @@

Source code for evergreen.metrics.buildmetrics

@property def pct_display_tasks_system_failure(self) -> float: - """ + """ Get the percentage of system failure display tasks. :return: Percentage of system failure display tasks. @@ -233,7 +235,7 @@

Source code for evergreen.metrics.buildmetrics

@property def create_time(self) -> Optional[datetime]: - """ + """ Time the first task of the build was created. :return: Time first task was created. @@ -244,7 +246,7 @@

Source code for evergreen.metrics.buildmetrics

@property def start_time(self) -> Optional[datetime]: - """ + """ Time first task of build was started. :return: Time first task was started. @@ -255,7 +257,7 @@

Source code for evergreen.metrics.buildmetrics

@property def end_time(self) -> Optional[datetime]: - """ + """ Time last task of build was completed. :return: Time last task was completed. @@ -266,7 +268,7 @@

Source code for evergreen.metrics.buildmetrics

@property def makespan(self) -> Optional[timedelta]: - """ + """ Wall clock duration of build. :return: Timedelta duration of build. @@ -277,7 +279,7 @@

Source code for evergreen.metrics.buildmetrics

@property def wait_time(self) -> Optional[timedelta]: - """ + """ Wall clock duration until build was started. :return: Timedelta duration until build was started. @@ -287,7 +289,7 @@

Source code for evergreen.metrics.buildmetrics

return None def _percent_tasks(self, n_tasks: int) -> float: - """ + """ Calculate the percent of n_tasks out of total. :param n_tasks: Number of tasks to calculate percent of. @@ -298,7 +300,7 @@

Source code for evergreen.metrics.buildmetrics

return n_tasks / self.total_tasks def _percent_display_tasks(self, n_tasks: int) -> float: - """ + """ Calculate the percent of display n_tasks out of display total. :param n_tasks: Number of display tasks to calculate percent of. @@ -309,7 +311,7 @@

Source code for evergreen.metrics.buildmetrics

return n_tasks / self.total_display_tasks def _count_task(self, task: "Task") -> None: - """ + """ Add stats for the given task to the metrics. :param task: Task to add. @@ -382,7 +384,7 @@

Source code for evergreen.metrics.buildmetrics

continue

[docs] def as_dict(self, include_children: bool = False) -> Dict: - """ + """ Provide a dictionary representation. :param include_children: Include child tasks in dictionary. @@ -421,22 +423,22 @@

Source code for evergreen.metrics.buildmetrics

return metric

def __str__(self) -> str: - """ + """ Create string version of metrics. :return: String version of the metrics. """ - return """Build Id: {build_id} + return """Build Id: {build_id} Total Processing Time: {total_processing_time:.2f}s ({total_processing_time_min:.2f}m) Makespan: {makespan:.2f}s ({makespan_min:.2f}m) Wait Time: {waittime:.2f}s ({waittime_min:.2f}m) - Total Tasks: {total_tasks} + Total Tasks: {total_tasks} Successful Tasks: {success_count} ({success_pct:.2%}) Undispatched Tasks: {undispatched_count} ({undispatched_pct:.2%}) Failed Tasks: {failed_count} ({failed_pct:.2%}) Timeout Tasks: {timeout_count} ({timeout_pct:.2%}) System Failure Tasks: {system_failure_count} ({system_failure_pct:.2%}) - Total Display Tasks: {total_display_tasks} + Total Display Tasks: {total_display_tasks} Successful Display Tasks: {success_display_count} ({success_display_pct:.2%}) Undispatched Display Tasks: {undispatched_display_count} ({undispatched_display_pct:.2%}) Failed Display Tasks: {failed_display_count} ({failed_display_pct:.2%}) @@ -491,19 +493,19 @@

Source code for evergreen.metrics.buildmetrics

Quick search

- +
diff --git a/_modules/evergreen/metrics/versionmetrics.html b/_modules/evergreen/metrics/versionmetrics.html index 681243b7..f08bac3f 100644 --- a/_modules/evergreen/metrics/versionmetrics.html +++ b/_modules/evergreen/metrics/versionmetrics.html @@ -1,17 +1,19 @@ - + - evergreen.metrics.versionmetrics — evergreen.py 3.6.19 documentation - - - + evergreen.metrics.versionmetrics — evergreen.py 3.6.20 documentation + + + + + @@ -60,10 +62,10 @@

Source code for evergreen.metrics.versionmetrics

[docs]class VersionMetrics(object): - """Metrics about an evergreen version.""" + """Metrics about an evergreen version.""" def __init__(self, version: "Version") -> None: - """ + """ Create an instance of version metrics. :param version: Version to analyze. @@ -84,7 +86,7 @@

Source code for evergreen.metrics.versionmetrics

self.build_list: Optional[List[Build]] = None
[docs] def calculate(self, task_filter_fn: Optional[Callable] = None) -> "VersionMetrics": - """ + """ Calculate metrics for the given build. :param task_filter_fn: function to filter tasks included for metrics, should accept a task @@ -99,7 +101,7 @@

Source code for evergreen.metrics.versionmetrics

@property def create_time(self) -> Optional[datetime]: - """ + """ Time the first task of the version was created. :return: Time first task was created. @@ -110,7 +112,7 @@

Source code for evergreen.metrics.versionmetrics

@property def start_time(self) -> Optional[datetime]: - """ + """ Time first task of version was started. :return: Time first task was started. @@ -121,7 +123,7 @@

Source code for evergreen.metrics.versionmetrics

@property def end_time(self) -> Optional[datetime]: - """ + """ Time last task of version was completed. :return: Time last task was completed. @@ -132,7 +134,7 @@

Source code for evergreen.metrics.versionmetrics

@property def makespan(self) -> Optional[float]: - """ + """ Wall clock duration of version. :return: Duration of version in seconds. @@ -143,7 +145,7 @@

Source code for evergreen.metrics.versionmetrics

@property def wait_time(self) -> Optional[float]: - """ + """ Wall clock duration until version was started. :return: Duration until version was started in seconds. @@ -154,7 +156,7 @@

Source code for evergreen.metrics.versionmetrics

@property def total_tasks(self) -> int: - """ + """ Get the total tasks in the version. :return: total tasks @@ -163,7 +165,7 @@

Source code for evergreen.metrics.versionmetrics

@property def pct_tasks_success(self) -> float: - """ + """ Get the percentage of successful tasks. :return: Percentage of successful tasks. @@ -172,7 +174,7 @@

Source code for evergreen.metrics.versionmetrics

@property def pct_tasks_failure(self) -> float: - """ + """ Get the percentage of failure tasks. :return: Percentage of failure tasks. @@ -181,7 +183,7 @@

Source code for evergreen.metrics.versionmetrics

@property def pct_tasks_timeout(self) -> float: - """ + """ Get the percentage of timeout tasks. :return: Percentage of timeout tasks. @@ -190,7 +192,7 @@

Source code for evergreen.metrics.versionmetrics

@property def pct_tasks_system_failure(self) -> float: - """ + """ Get the percentage of system failure tasks. :return: Percentage of system failure tasks. @@ -198,7 +200,7 @@

Source code for evergreen.metrics.versionmetrics

return self._percent_tasks(self.task_system_failure_count) def _percent_tasks(self, n_tasks: int) -> float: - """ + """ Calculate the percent of n_tasks out of total. :param n_tasks: Number of tasks to calculate percent of. @@ -210,7 +212,7 @@

Source code for evergreen.metrics.versionmetrics

return n_tasks / self.total_tasks def _count_build(self, build: "Build", task_filter_fn: Optional[Callable]) -> None: - """ + """ Add stats for the given build to the metrics. :param task_filter_fn: function to filter tasks included for metrics, should accept a task @@ -245,7 +247,7 @@

Source code for evergreen.metrics.versionmetrics

self._finish_times.append(build_metrics.end_time)
[docs] def as_dict(self, include_children: bool = False) -> Dict: - """ + """ Provide a dictionary representation. :param include_children: Include child build tasks in dictionary. @@ -269,7 +271,7 @@

Source code for evergreen.metrics.versionmetrics

return metric
def __str__(self) -> str: - """ + """ Create string version of metrics. :return: String version of metrics. @@ -280,11 +282,11 @@

Source code for evergreen.metrics.versionmetrics

waittime = self.wait_time if self.wait_time else 0 waittime_min = self.wait_time / 60 if self.wait_time else 0 - return """Version Id: {version} + return """Version Id: {version} Total Processing Time: {total_processing_time:.2f}s ({total_processing_time_min:.2f}m) Makespan: {makespan:.2f}s ({makespan_min:.2f}m) Wait Time: {waittime:.2f}s ({waittime_min:.2f}m) - Total Tasks: {task_total} + Total Tasks: {task_total} Successful Tasks: {task_success_count} ({task_pct_success:.2%}) Failed Tasks: {task_failure_count} ({task_pct_failed:.2%}) Timed Out Tasks: {task_timeout_count} ({task_pct_timed_out:.2%}) @@ -325,19 +327,19 @@

Source code for evergreen.metrics.versionmetrics

Quick search

- +
diff --git a/_modules/evergreen/patch.html b/_modules/evergreen/patch.html index dd74785e..25df03d4 100644 --- a/_modules/evergreen/patch.html +++ b/_modules/evergreen/patch.html @@ -1,17 +1,19 @@ - + - evergreen.patch — evergreen.py 3.6.19 documentation - - - + evergreen.patch — evergreen.py 3.6.20 documentation + + + + + @@ -55,7 +57,7 @@

Source code for evergreen.patch

 
 
 
[docs]class GithubPatchData(_BaseEvergreenObject): - """Representation of github patch data in a patch object.""" + """Representation of github patch data in a patch object.""" pr_number = evg_attrib("pr_number") base_owner = evg_attrib("base_owner") @@ -66,7 +68,7 @@

Source code for evergreen.patch

     author = evg_attrib("author")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of github patch data.
 
         :param json: json representing github patch data.
@@ -76,12 +78,12 @@ 

Source code for evergreen.patch

 
 
 
[docs]class VariantsTasks(_BaseEvergreenObject): - """Representation of a variants tasks object.""" + """Representation of a variants tasks object.""" name = evg_attrib("name") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """ + """ Create an instance of a variants tasks object. :param json: json representing variants tasks object. @@ -92,7 +94,7 @@

Source code for evergreen.patch

 
     @property
     def tasks(self) -> Set[str]:
-        """
+        """
         Retrieve the set of all tasks for this variant.
 
         :return: Set of all tasks for this variant.
@@ -104,7 +106,7 @@ 

Source code for evergreen.patch

 
 
 
[docs]class FileDiff(_BaseEvergreenObject): - """Representation of a file diff for a patch.""" + """Representation of a file diff for a patch.""" file_name = evg_attrib("file_name") additions = evg_attrib("additions") @@ -113,7 +115,7 @@

Source code for evergreen.patch

     description = evg_attrib("description")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of a file diff.
 
         :param json: JSON representing the data.
@@ -123,7 +125,7 @@ 

Source code for evergreen.patch

 
 
 
[docs]class ModuleCodeChanges(_BaseEvergreenObject): - """Representation of the module code changes for a patch.""" + """Representation of the module code changes for a patch.""" branch_name = evg_attrib("branch_name") html_link = evg_attrib("html_link") @@ -131,7 +133,7 @@

Source code for evergreen.patch

     commit_messages = evg_attrib("commit_messages")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of the module code changes.
 
         :param json: JSON representing the data.
@@ -141,19 +143,19 @@ 

Source code for evergreen.patch

 
     @property
     def file_diffs(self) -> List[FileDiff]:
-        """Retrieve a list of the file diffs for this patch."""
+        """Retrieve a list of the file diffs for this patch."""
         return [FileDiff(diff, self._api) for diff in self.json["module_code_changes"]]
[docs]class PatchCreationDetails(NamedTuple): - """Details of a patch creation.""" + """Details of a patch creation.""" url: str id: str
[docs]class Patch(_BaseEvergreenObject): - """Representation of an Evergreen patch.""" + """Representation of an Evergreen patch.""" patch_id = evg_attrib("patch_id") description = evg_attrib("description") @@ -174,7 +176,7 @@

Source code for evergreen.patch

     commit_queue_position = evg_attrib("commit_queue_position")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of an evergreen patch.
 
         :param json: json representing patch.
@@ -185,7 +187,7 @@ 

Source code for evergreen.patch

 
     @property
     def github_patch_data(self) -> GithubPatchData:
-        """
+        """
         Retrieve the github patch data for this patch.
 
         :return: Github Patch Data for this patch.
@@ -194,7 +196,7 @@ 

Source code for evergreen.patch

 
     @property
     def module_code_changes(self) -> List[ModuleCodeChanges]:
-        """
+        """
         Retrieve the modele code changes for this patch.
 
         :return: Module code changes for this patch.
@@ -203,7 +205,7 @@ 

Source code for evergreen.patch

 
     @property
     def variants_tasks(self) -> List[VariantsTasks]:
-        """
+        """
         Retrieve the variants tasks for this patch.
 
         :return: variants tasks for this patch.
@@ -215,7 +217,7 @@ 

Source code for evergreen.patch

         return self._variants_tasks
 
 
[docs] def task_list_for_variant(self, variant: str) -> Set[str]: - """ + """ Retrieve the list of tasks for the given variant. :param variant: name of variant to search for. @@ -226,7 +228,7 @@

Source code for evergreen.patch

         return self._variant_task_dict[variant]
[docs] def get_version(self) -> "Version": - """ + """ Get version for this patch. :return: Version object. @@ -234,7 +236,7 @@

Source code for evergreen.patch

         return self._api.version_by_id(self.version)
[docs] def is_in_commit_queue(self) -> bool: - """ + """ Check whether this patch is currently in the commit queue. :return: True if in the commit queue, False otherwise. @@ -242,7 +244,7 @@

Source code for evergreen.patch

         return self.commit_queue_position is not None and self.commit_queue_position >= 0
def __str__(self) -> str: - """Get a human readable string version of the patch.""" + """Get a human readable string version of the patch.""" return "{}: {}".format(self.patch_id, self.description)
@@ -262,19 +264,19 @@

Source code for evergreen.patch

   

Quick search

- +
diff --git a/_modules/evergreen/performance_results.html b/_modules/evergreen/performance_results.html index 80e780b4..e49ad1bb 100644 --- a/_modules/evergreen/performance_results.html +++ b/_modules/evergreen/performance_results.html @@ -1,17 +1,19 @@ - + - evergreen.performance_results — evergreen.py 3.6.19 documentation - - - + evergreen.performance_results — evergreen.py 3.6.20 documentation + + + + + @@ -56,7 +58,7 @@

Source code for evergreen.performance_results

[docs]class PerformanceTestResult(_BaseEvergreenObject): - """Representation of a test result from Evergreen.""" + """Representation of a test result from Evergreen.""" thread_level = evg_attrib("thread_level") recorded_values = evg_attrib("recorded_values") @@ -64,23 +66,23 @@

Source code for evergreen.performance_results

measurement = evg_attrib("measurement") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """Create an instance of a test result.""" + """Create an instance of a test result.""" super(PerformanceTestResult, self).__init__(json, api)
[docs]class PerformanceTestRun(_BaseEvergreenObject): - """Representation of a test run from Evergreen.""" + """Representation of a test run from Evergreen.""" workload = evg_attrib("workload") test_name = evg_attrib("name") def __init__(self, test_result: Dict, api: "EvergreenApi") -> None: - """Create an instance of a test run.""" + """Create an instance of a test run.""" super(PerformanceTestRun, self).__init__(test_result, api) @property def start(self) -> Optional[Any]: - """Get the start time for the given test run.""" + """Get the start time for the given test run.""" # Microbenchmarks stores the 'start' and 'end' time of the test in the inner 'results' field # while sys-perf stores it in the outer 'results' field. # Also, the format of start varies depending on what generated the results. @@ -88,7 +90,7 @@

Source code for evergreen.performance_results

@property def end(self) -> Optional[Any]: - """Get the start time for the given test run.""" + """Get the start time for the given test run.""" # Microbenchmarks stores the 'start' and 'end' time of the test in the inner 'results' field # while sys-perf stores it in the outer 'results' field. # Also, the format of end varies depending on what generated the results. @@ -96,7 +98,7 @@

Source code for evergreen.performance_results

@property def test_results(self) -> List[PerformanceTestResult]: - """Get the performance test results for this run.""" + """Get the performance test results for this run.""" return [ PerformanceTestResult(item, self._api) for item in _format_performance_results(self.json["results"]) @@ -104,7 +106,7 @@

Source code for evergreen.performance_results

[docs]class PerformanceTestBatch(_BaseEvergreenObject): - """Representation of a batch of tests from Evergreen.""" + """Representation of a batch of tests from Evergreen.""" start = evg_attrib("start") end = evg_attrib("end") @@ -114,17 +116,17 @@

Source code for evergreen.performance_results

def __init__( self, json: Dict[str, Any], api: "EvergreenApi", parent: "PerformanceData" ) -> None: - """Create an instance of a batch of tests.""" + """Create an instance of a batch of tests.""" super(PerformanceTestBatch, self).__init__(json, api) self.parent = parent @property def test_runs(self) -> List[PerformanceTestRun]: - """Get a list of test runs.""" + """Get a list of test runs.""" return [PerformanceTestRun(item, self._api) for item in self.json["results"]]
[docs] def test_runs_matching(self, tests: List[str]) -> List[PerformanceTestRun]: - """ + """ Get a list of test run for the given tests. :param tests: List of tests to match against. @@ -134,7 +136,7 @@

Source code for evergreen.performance_results

[docs]class PerformanceData(_BaseEvergreenObject): - """Representation of performance data from Evergreen.""" + """Representation of performance data from Evergreen.""" name = evg_attrib("name") project_id = evg_attrib("project_id") @@ -148,16 +150,16 @@

Source code for evergreen.performance_results

create_time = evg_short_datetime_attrib("create_time") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """Create an instance of performance data.""" + """Create an instance of performance data.""" super(PerformanceData, self).__init__(json, api) @property def test_batch(self) -> PerformanceTestBatch: - """Get the performance test batch.""" + """Get the performance test batch.""" return PerformanceTestBatch(self.json["data"], self._api, self) def __repr__(self) -> str: - """ + """ Get string representation of PerformanceData for debugging purposes. :return: String representation of PreformanceData. @@ -166,7 +168,7 @@

Source code for evergreen.performance_results

def _format_performance_results(results: Dict) -> List[Dict]: - """ + """ Extract and sort the thread level and respective results. Data gathered from the raw data file from Evergreen, @@ -346,7 +348,7 @@

Source code for evergreen.performance_results

def _thread_levels_from_results(results: Dict) -> List[str]: - """ + """ Gather the thread levels from the results dict. :param results: Dictionary of performance results. @@ -359,7 +361,7 @@

Source code for evergreen.performance_results

def _is_run_matching(test_run: PerformanceTestRun, tests: List[str]) -> bool: - """ + """ Determine if the given test_run.json matches a set of tests. :param test_run: test_run.json to check. @@ -394,19 +396,19 @@

Source code for evergreen.performance_results

Quick search
- +
diff --git a/_modules/evergreen/project.html b/_modules/evergreen/project.html index 6e11b037..f3bd5198 100644 --- a/_modules/evergreen/project.html +++ b/_modules/evergreen/project.html @@ -1,17 +1,19 @@ - + - evergreen.project — evergreen.py 3.6.19 documentation - - - + evergreen.project — evergreen.py 3.6.20 documentation + + + + + @@ -56,7 +58,7 @@

Source code for evergreen.project

 
 
 
[docs]class Project(_BaseEvergreenObject): - """Representation of an Evergreen project.""" + """Representation of an Evergreen project.""" batch_time = evg_attrib("batch_time") branch_name = evg_attrib("branch_name") @@ -76,7 +78,7 @@

Source code for evergreen.project

     commit_queue = evg_attrib("commit_queue")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of an evergreen project.
 
         :param json: json representing project.
@@ -85,11 +87,11 @@ 

Source code for evergreen.project

         super(Project, self).__init__(json, api)
 
     def __str__(self) -> str:
-        """Get a string version of the Project."""
+        """Get a string version of the Project."""
         return self.identifier
 
 
[docs] def most_recent_version(self) -> Version: - """ + """ Fetch the most recent version. :return: Version queried for. @@ -114,19 +116,19 @@

Source code for evergreen.project

   

Quick search

- +
diff --git a/_modules/evergreen/resource_type_permissions.html b/_modules/evergreen/resource_type_permissions.html index d6f25098..0bafa62f 100644 --- a/_modules/evergreen/resource_type_permissions.html +++ b/_modules/evergreen/resource_type_permissions.html @@ -1,17 +1,19 @@ - + - evergreen.resource_type_permissions — evergreen.py 3.6.19 documentation - - - + evergreen.resource_type_permissions — evergreen.py 3.6.20 documentation + + + + + @@ -56,7 +58,7 @@

Source code for evergreen.resource_type_permissions

[docs]class PermissionableResourceType(str, Enum): - """Represents resource types that a user can be granted permissions to.""" + """Represents resource types that a user can be granted permissions to.""" PROJECT = "project" DISTRO = "distro" @@ -64,7 +66,7 @@

Source code for evergreen.resource_type_permissions

[docs]class RemovablePermission(str, Enum): - """Represents a permission that can be removed from a user.""" + """Represents a permission that can be removed from a user.""" PROJECT = "project" DISTRO = "distro" @@ -73,13 +75,13 @@

Source code for evergreen.resource_type_permissions

[docs]class ResourceTypePermissions(_BaseEvergreenObject): - """Representation of a user's permissions on resources of a specific type.""" + """Representation of a user's permissions on resources of a specific type.""" resource_type = evg_attrib("type") permissions = evg_attrib("permissions") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """ + """ Create an instance of a resource type permission set. :param json: JSON of resource type permissions. @@ -104,19 +106,19 @@

Source code for evergreen.resource_type_permissions

Quick search
- +
diff --git a/_modules/evergreen/stats.html b/_modules/evergreen/stats.html index 8d692f0a..eb8ac099 100644 --- a/_modules/evergreen/stats.html +++ b/_modules/evergreen/stats.html @@ -1,17 +1,19 @@ - + - evergreen.stats — evergreen.py 3.6.19 documentation - - - + evergreen.stats — evergreen.py 3.6.20 documentation + + + + + @@ -55,7 +57,7 @@

Source code for evergreen.stats

 
 
 
[docs]class TestStats(_BaseEvergreenObject): - """Representation of an Evergreen test stats object.""" + """Representation of an Evergreen test stats object.""" test_file = evg_attrib("test_file") task_name = evg_attrib("task_name") @@ -68,7 +70,7 @@

Source code for evergreen.stats

     avg_duration_pass = evg_attrib("avg_duration_pass")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of a test stats object.
 
         :param json: json version of object.
@@ -77,7 +79,7 @@ 

Source code for evergreen.stats

 
 
 
[docs]class TaskStats(_BaseEvergreenObject): - """Representation of an Evergreen task stats object.""" + """Representation of an Evergreen task stats object.""" task_name = evg_attrib("task_name") variant = evg_attrib("variant") @@ -89,7 +91,7 @@

Source code for evergreen.stats

     avg_duration_pass = evg_attrib("avg_duration_success")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of a test stats object.
 
         :param json: json version of object.
@@ -113,19 +115,19 @@ 

Source code for evergreen.stats

   

Quick search

- +
diff --git a/_modules/evergreen/task.html b/_modules/evergreen/task.html index aa2d022e..10379250 100644 --- a/_modules/evergreen/task.html +++ b/_modules/evergreen/task.html @@ -1,17 +1,19 @@ - + - evergreen.task — evergreen.py 3.6.19 documentation - - - + evergreen.task — evergreen.py 3.6.20 documentation + + + + + @@ -74,7 +76,7 @@

Source code for evergreen.task

 
 
 
[docs]class Artifact(_BaseEvergreenObject): - """Representation of a task artifact from evergreen.""" + """Representation of a task artifact from evergreen.""" name = evg_attrib("name") url = evg_attrib("url") @@ -83,7 +85,7 @@

Source code for evergreen.task

     content_type = evg_attrib("content_type")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """Create an instance of an evergreen task artifact."""
+        """Create an instance of an evergreen task artifact."""
         super(Artifact, self).__init__(json, api)
 
 
[docs] def stream( @@ -92,7 +94,7 @@

Source code for evergreen.task

         chunk_size: Optional[int] = None,
         is_binary: Optional[bool] = None,
     ) -> Iterable[str]:
-        """
+        """
         Retrieve an iterator of the streamed contents of this artifact.
 
         :param decode_unicode: determines if we decode as unicode
@@ -108,7 +110,7 @@ 

Source code for evergreen.task

         )
def _is_binary(self) -> bool: - """Determine if an artifact is binary based on content_type.""" + """Determine if an artifact is binary based on content_type.""" _type, subtype = self.content_type.split("/") if _type in _BINARY_TYPES: @@ -118,7 +120,7 @@

Source code for evergreen.task

 
 
 
[docs]class StatusScore(IntEnum): - """Integer score of the task status.""" + """Integer score of the task status.""" SUCCESS = 1 FAILURE = 2 @@ -128,7 +130,7 @@

Source code for evergreen.task

 
 
[docs] @classmethod def get_task_status_score(cls, task: "Task") -> "StatusScore": - """ + """ Retrieve the status score based on the task status. :return: Status score. @@ -145,18 +147,18 @@

Source code for evergreen.task

 
 
 
[docs]class OomTrackerInfo(_BaseEvergreenObject): - """Representation of a task's OOM Tracker Info from evergreen.""" + """Representation of a task's OOM Tracker Info from evergreen.""" detected = evg_attrib("detected") pids = evg_attrib("pids") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """Create an instance of an evergreen task OOM Tracker Info.""" + """Create an instance of an evergreen task OOM Tracker Info.""" super(OomTrackerInfo, self).__init__(json, api)
[docs]class StatusDetails(_BaseEvergreenObject): - """Representation of a task status details from evergreen.""" + """Representation of a task status details from evergreen.""" status = evg_attrib("status") type = evg_attrib("type") @@ -164,12 +166,12 @@

Source code for evergreen.task

     timed_out = evg_attrib("timed_out")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """Create an instance of an evergreen task status details."""
+        """Create an instance of an evergreen task status details."""
         super(StatusDetails, self).__init__(json, api)
 
     @property
     def oom_tracker_info(self) -> OomTrackerInfo:
-        """
+        """
         Retrieve the OOM tracker info from the status details for the given task.
 
         :return: OOM Tracker Info.
@@ -178,7 +180,7 @@ 

Source code for evergreen.task

 
 
 
[docs]class Task(_BaseEvergreenObject): - """Representation of an Evergreen task.""" + """Representation of an Evergreen task.""" activated = evg_attrib("activated") activated_by = evg_attrib("activated_by") @@ -219,13 +221,13 @@

Source code for evergreen.task

     version_id = evg_attrib("version_id")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """Create an instance of an evergreen task."""
+        """Create an instance of an evergreen task."""
         super(Task, self).__init__(json, api)
         self._logs_map: Optional[Dict[Any, Any]] = None
 
     @property
     def artifacts(self) -> List[Artifact]:
-        """
+        """
         Retrieve the artifacts for the given task.
 
         :return: List of artifacts.
@@ -236,7 +238,7 @@ 

Source code for evergreen.task

 
     @property
     def log_map(self) -> Dict:
-        """
+        """
         Retrieve a dict of all the logs.
 
         :return: Dictionary of the logs.
@@ -246,7 +248,7 @@ 

Source code for evergreen.task

         return self._logs_map
 
 
[docs] def get_project_identifier(self) -> str: - """ + """ Return the human-readable project id. Can also be accessed as an attribute. :return: Human-readable project id. @@ -254,7 +256,7 @@

Source code for evergreen.task

         return self.project_identifier
[docs] def retrieve_log(self, log_name: str, raw: bool = False) -> str: - """ + """ Retrieve the contents of the specified log. :param log_name: Name of log to retrieve. @@ -264,7 +266,7 @@

Source code for evergreen.task

         return self._api.retrieve_task_log(self.log_map[log_name], raw)
[docs] def stream_log(self, log_name: str) -> Iterable[str]: - """ + """ Retrieve an iterator of a streamed log contents for the given log. :param log_name: Log to stream. @@ -274,7 +276,7 @@

Source code for evergreen.task

 
     @property
     def status_details(self) -> StatusDetails:
-        """
+        """
         Retrieve the status details for the given task.
 
         :return: Status details.
@@ -282,7 +284,7 @@ 

Source code for evergreen.task

         return StatusDetails(self.json["status_details"], self._api)
 
 
[docs] def get_status_score(self) -> StatusScore: - """ + """ Retrieve the status score enum for the given task. :return: Status score. @@ -290,7 +292,7 @@

Source code for evergreen.task

         return StatusScore.get_task_status_score(self)
[docs] def get_execution(self, execution: int) -> Optional["Task"]: - """ + """ Get the task info for the specified execution. :param execution: Index of execution. @@ -307,7 +309,7 @@

Source code for evergreen.task

         return None
[docs] def get_execution_or_self(self, execution: int) -> "Task": - """ + """ Get the specified execution if it exists. If the specified execution does not exist, return self. @@ -321,7 +323,7 @@

Source code for evergreen.task

         return self
[docs] def wait_time(self) -> Optional[timedelta]: - """ + """ Get the time taken until the task started running. :return: Time taken until task started running. @@ -331,7 +333,7 @@

Source code for evergreen.task

         return None
[docs] def wait_time_once_unblocked(self) -> Optional[timedelta]: - """ + """ Get the time taken until the task started running. Once it is unblocked by task dependencies. @@ -343,7 +345,7 @@

Source code for evergreen.task

         return None
[docs] def is_success(self) -> bool: - """ + """ Whether task was successful. :return: True if task was successful. @@ -351,7 +353,7 @@

Source code for evergreen.task

         return self.status == EVG_SUCCESS_STATUS
[docs] def is_test_failure(self) -> bool: - """ + """ Whether task was a test failure. :return: True is task was a test failure. @@ -361,7 +363,7 @@

Source code for evergreen.task

         return False
[docs] def is_undispatched(self) -> bool: - """ + """ Whether the task was undispatched. :return: True is task was undispatched. @@ -369,7 +371,7 @@

Source code for evergreen.task

         return self.status == EVG_UNDISPATCHED_STATUS
[docs] def is_system_failure(self) -> bool: - """ + """ Whether task resulted in a system failure. :return: True if task was a system failure. @@ -379,7 +381,7 @@

Source code for evergreen.task

         return False
[docs] def is_timeout(self) -> bool: - """ + """ Whether task results in a timeout. :return: True if task was a timeout. @@ -389,7 +391,7 @@

Source code for evergreen.task

         return False
[docs] def is_setup_failure(self) -> bool: - """ + """ Whether task is a setup failure. :return: True if task is a setup failure. @@ -399,7 +401,7 @@

Source code for evergreen.task

         return False
[docs] def is_completed(self) -> bool: - """ + """ Whether task is completed. :return: True if task is completed. @@ -407,7 +409,7 @@

Source code for evergreen.task

         return self.status == EVG_SUCCESS_STATUS or self.status == EVG_FAILED_STATUS
[docs] def has_oom(self) -> bool: - """ + """ Determine if the given task has an OOM failure. :return: True if task has an OOM failure. @@ -415,7 +417,7 @@

Source code for evergreen.task

         return self.status_details.oom_tracker_info.detected
[docs] def is_active(self) -> bool: - """ + """ Determine if the given task is active. :return: True if task is active. @@ -425,7 +427,7 @@

Source code for evergreen.task

 
[docs] def get_tests( self, status: Optional[str] = None, execution: Optional[int] = None ) -> List["Tst"]: - """ + """ Get the test results for this task. :param status: Only return tests with the given status. @@ -439,7 +441,7 @@

Source code for evergreen.task

         )
[docs] def get_num_of_tests(self) -> int: - """ + """ Get the number of tests that ran as part of this task. :return: Number of tests for the task. @@ -449,7 +451,7 @@

Source code for evergreen.task

 
[docs] def get_execution_tasks( self, filter_fn: Optional[Callable[["Task"], bool]] = None ) -> Optional[List["Task"]]: - """ + """ Get a list of execution tasks associated with this task. If this is a display task, return the tasks execution tasks associated with it. @@ -475,15 +477,15 @@

Source code for evergreen.task

         return None
[docs] def get_manifest(self) -> Optional[Manifest]: - """Get the Manifest for this task.""" + """Get the Manifest for this task.""" return self._api.manifest_for_task(self.task_id)
[docs] def get_task_annotation(self) -> List[TaskAnnotation]: - """Get the task annotation for this task.""" + """Get the task annotation for this task.""" return self._api.get_task_annotation(self.task_id, self.execution)
[docs] def get_oom_pids(self) -> List[int]: - """Get the OOM PIDs for this task.""" + """Get the OOM PIDs for this task.""" return ( self.status_details.oom_tracker_info.pids if self.status_details.oom_tracker_info.pids @@ -498,7 +500,7 @@

Source code for evergreen.task

         metadata: Optional[Dict[str, Any]] = None,
         metadata_links: Optional[List[MetadataLinkRequest]] = None,
     ) -> None:
-        """
+        """
         Annotate the specified task.
 
         :param message: Message to add to the annotations.
@@ -518,7 +520,7 @@ 

Source code for evergreen.task

         )
def __repr__(self) -> str: - """ + """ Get a string representation of Task for debugging purposes. :return: String representation of Task. @@ -542,19 +544,19 @@

Source code for evergreen.task

   

Quick search

- +
diff --git a/_modules/evergreen/task_annotations.html b/_modules/evergreen/task_annotations.html index 5bcd063f..935e7acf 100644 --- a/_modules/evergreen/task_annotations.html +++ b/_modules/evergreen/task_annotations.html @@ -1,17 +1,19 @@ - + - evergreen.task_annotations — evergreen.py 3.6.19 documentation - - - + evergreen.task_annotations — evergreen.py 3.6.20 documentation + + + + + @@ -52,97 +54,97 @@

Source code for evergreen.task_annotations

 
 
 
[docs]class Source(_BaseEvergreenObject): - """Source of where an annotation was generated.""" + """Source of where an annotation was generated.""" author = evg_attrib("author") time = evg_datetime_attrib("time") requester = evg_attrib("requester") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """Create an instance of a task annotation source.""" + """Create an instance of a task annotation source.""" super().__init__(json, api)
[docs]class Note(_BaseEvergreenObject): - """Representation of a note associated with a task annotation.""" + """Representation of a note associated with a task annotation.""" message = evg_attrib("message") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """Create an instance of a task annotation note.""" + """Create an instance of a task annotation note.""" super().__init__(json, api) @property def source(self) -> Source: - """Get the source of this note.""" + """Get the source of this note.""" return Source(self.json["source"], self._api)
[docs]class TaskAnnotation(_BaseEvergreenObject): - """Representation of a task annotation.""" + """Representation of a task annotation.""" task_id = evg_attrib("task_id") task_execution = evg_attrib("task_execution") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """Create an instance of a task annotations.""" + """Create an instance of a task annotations.""" super().__init__(json, api) @property def issues(self) -> List[IssueLink]: - """Get the issues this task has been annotated with.""" + """Get the issues this task has been annotated with.""" return [IssueLink(j, self._api) for j in self.json.get("issues", [])] @property def suspected_issues(self) -> List[IssueLink]: - """Get the suspected issues this task has been annotated with.""" + """Get the suspected issues this task has been annotated with.""" return [IssueLink(j, self._api) for j in self.json.get("suspected_issues", [])] @property def metadata(self) -> Dict[str, Any]: - """Get metadata associated with this annotation.""" + """Get metadata associated with this annotation.""" return self.json.get("metadata", {}) @property def note(self) -> Note: - """Get a note about this annotation.""" + """Get a note about this annotation.""" return Note(self.json.get("note", {}), self._api) @property def metadata_links(self) -> List[MetadataLink]: - """Get metadata links for this annotation.""" + """Get metadata links for this annotation.""" return [MetadataLink(link, self._api) for link in self.json.get("metadata_links", [])]
@@ -162,19 +164,19 @@

Source code for evergreen.task_annotations

   

Quick search

- +
diff --git a/_modules/evergreen/task_reliability.html b/_modules/evergreen/task_reliability.html index 5cad9ff7..1d28f0a2 100644 --- a/_modules/evergreen/task_reliability.html +++ b/_modules/evergreen/task_reliability.html @@ -1,17 +1,19 @@ - + - evergreen.task_reliability — evergreen.py 3.6.19 documentation - - - + evergreen.task_reliability — evergreen.py 3.6.20 documentation + + + + + @@ -55,7 +57,7 @@

Source code for evergreen.task_reliability

 
 
 
[docs]class TaskReliability(_BaseEvergreenObject): - """Representation of an Evergreen task reliability object.""" + """Representation of an Evergreen task reliability object.""" test_file = evg_attrib("test_file") task_name = evg_attrib("task_name") @@ -73,7 +75,7 @@

Source code for evergreen.task_reliability

     success_rate = evg_attrib("success_rate")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of a test stats object.
 
         :param json: json version of object.
@@ -97,19 +99,19 @@ 

Source code for evergreen.task_reliability

   

Quick search

- +
diff --git a/_modules/evergreen/tst.html b/_modules/evergreen/tst.html index 927b821f..6942a158 100644 --- a/_modules/evergreen/tst.html +++ b/_modules/evergreen/tst.html @@ -1,17 +1,19 @@ - + - evergreen.tst — evergreen.py 3.6.19 documentation - - - + evergreen.tst — evergreen.py 3.6.20 documentation + + + + + @@ -55,7 +57,7 @@

Source code for evergreen.tst

 
 
 
[docs]class Logs(_BaseEvergreenObject): - """Representation of test logs from evergreen.""" + """Representation of test logs from evergreen.""" url = evg_attrib("url") line_num = evg_attrib("line_num") @@ -65,11 +67,11 @@

Source code for evergreen.tst

     log_id = evg_attrib("log_id")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """Create an instance of a Test log."""
+        """Create an instance of a Test log."""
         super(Logs, self).__init__(json, api)
 
 
[docs] def stream(self) -> Iterable[str]: - """ + """ Retrieve an iterator of the streamed contents of this log. :return: Iterable to stream contents of log. @@ -78,7 +80,7 @@

Source code for evergreen.tst

 
 
 
[docs]class Tst(_BaseEvergreenObject): - """Representation of a test object from evergreen.""" + """Representation of a test object from evergreen.""" task_id = evg_attrib("task_id") status = evg_attrib("status") @@ -88,12 +90,12 @@

Source code for evergreen.tst

     end_time = evg_datetime_attrib("end_time")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """Create an instance of a Test object."""
+        """Create an instance of a Test object."""
         super(Tst, self).__init__(json, api)
 
     @property
     def logs(self) -> Logs:
-        """
+        """
         Get the log object for the given test.
 
         :return: log object for test.
@@ -117,19 +119,19 @@ 

Source code for evergreen.tst

   

Quick search

- +
diff --git a/_modules/evergreen/users_for_role.html b/_modules/evergreen/users_for_role.html index 5595ce6d..df5dc2f4 100644 --- a/_modules/evergreen/users_for_role.html +++ b/_modules/evergreen/users_for_role.html @@ -1,17 +1,19 @@ - + - evergreen.users_for_role — evergreen.py 3.6.19 documentation - - - + evergreen.users_for_role — evergreen.py 3.6.20 documentation + + + + + @@ -53,12 +55,12 @@

Source code for evergreen.users_for_role

 
 
 
[docs]class UsersForRole(_BaseEvergreenObject): - """Representation of a list of users having an evergreen role.""" + """Representation of a list of users having an evergreen role.""" users = evg_attrib("users") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """Create an instance of a UsersForRole object.""" + """Create an instance of a UsersForRole object.""" super(UsersForRole, self).__init__(json, api)
@@ -78,19 +80,19 @@

Source code for evergreen.users_for_role

   

Quick search

- +
diff --git a/_modules/evergreen/util.html b/_modules/evergreen/util.html index c28c80cf..6f0a32eb 100644 --- a/_modules/evergreen/util.html +++ b/_modules/evergreen/util.html @@ -1,17 +1,19 @@ - + - evergreen.util — evergreen.py 3.6.19 documentation - - - + evergreen.util — evergreen.py 3.6.20 documentation + + + + + @@ -55,7 +57,7 @@

Source code for evergreen.util

 
 
 
[docs]def parse_evergreen_datetime(evg_date: Optional[Any]) -> Optional[datetime]: - """ + """ Convert an evergreen datetime string into a datetime object. :param evg_date: String to convert to a datetime. @@ -71,7 +73,7 @@

Source code for evergreen.util

 
 
 
[docs]def parse_evergreen_short_datetime(evg_date: Optional[str]) -> Optional[datetime]: - """ + """ Convert an evergreen datetime string into a datetime object. :param evg_date: String to convert to a datetime. @@ -84,7 +86,7 @@

Source code for evergreen.util

 
 
 
[docs]def format_evergreen_datetime(when: datetime) -> str: - """ + """ Convert a datetime object into an evergreen consumable string. :param when: datetime to convert. @@ -94,7 +96,7 @@

Source code for evergreen.util

 
 
 
[docs]def evergreen_input_to_output(input_date: str) -> str: - """ + """ Convert a date from evergreen to a date to send back to evergreen. :param input_date: date to convert. @@ -107,7 +109,7 @@

Source code for evergreen.util

 
 
 
[docs]def parse_evergreen_date(evg_date: Optional[str]) -> Optional[date]: - """ + """ Convert an evergreen date string into a date object. :param evg_date: String to convert to a date. @@ -119,7 +121,7 @@

Source code for evergreen.util

 
 
 
[docs]def format_evergreen_date(when: datetime) -> str: - """ + """ Convert a datetime object into a string date that evergreen understands. :param when: Datetime object to convert. @@ -131,7 +133,7 @@

Source code for evergreen.util

 
[docs]def iterate_by_time_window( iterator: Iterable, before: datetime, after: datetime, time_attr: str ) -> Iterable: - """ + """ Iterate over a window of time. For a given iterator, generate the items that are within the specified time window. @@ -173,19 +175,19 @@

Source code for evergreen.util

   

Quick search

- +
diff --git a/_modules/evergreen/version.html b/_modules/evergreen/version.html index aa3e1fbd..db0121ff 100644 --- a/_modules/evergreen/version.html +++ b/_modules/evergreen/version.html @@ -1,17 +1,19 @@ - + - evergreen.version — evergreen.py 3.6.19 documentation - - - + evergreen.version — evergreen.py 3.6.20 documentation + + + + + @@ -66,7 +68,7 @@

Source code for evergreen.version

 
 
 
[docs]class Requester(str, Enum): - """Requester that created version.""" + """Requester that created version.""" PATCH_REQUEST = "patch_request" GITTER_REQUEST = "gitter_request" @@ -77,11 +79,11 @@

Source code for evergreen.version

     UNKNOWN = "UNKNOWN"
 
 
[docs] def evg_value(self) -> str: - """Get the evergreen value for a requester.""" + """Get the evergreen value for a requester.""" return self.name.lower()
[docs] def stats_value(self) -> str: - """Get the value for the stats endpoints.""" + """Get the value for the stats endpoints.""" value_mappings = { Requester.PATCH_REQUEST: "patch", Requester.GITTER_REQUEST: "mainline", @@ -112,22 +114,22 @@

Source code for evergreen.version

 
 
 
[docs]class BuildVariantStatus(_BaseEvergreenObject): - """Representation of a Build Variants status.""" + """Representation of a Build Variants status.""" build_variant = evg_attrib("build_variant") build_id = evg_attrib("build_id") def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None: - """Create an instance of a Build Variants status.""" + """Create an instance of a Build Variants status.""" super(BuildVariantStatus, self).__init__(json, api)
[docs] def get_build(self) -> "Build": - """Get the build object for this build variants status.""" + """Get the build object for this build variants status.""" return self._api.build_by_id(self.build_id)
[docs]class Version(_BaseEvergreenObject): - """Representation of an Evergreen Version.""" + """Representation of an Evergreen Version.""" version_id = evg_attrib("version_id") create_time = evg_datetime_attrib("create_time") @@ -150,7 +152,7 @@

Source code for evergreen.version

     parameters = evg_attrib("parameters")
 
     def __init__(self, json: Dict[str, Any], api: "EvergreenApi") -> None:
-        """
+        """
         Create an instance of an evergreen version.
 
         :param json: json representing version
@@ -167,7 +169,7 @@ 

Source code for evergreen.version

                 build_variants_map=self.build_variants_map,
             )
         else:
-            LOGGER.error(
+            LOGGER.debug(
                 "build_variants_status either empty or not found for version",
                 version_id=self.version_id,
                 json=self.json,
@@ -176,7 +178,7 @@ 

Source code for evergreen.version

 
     @property
     def build_variants_status(self) -> List[BuildVariantStatus]:
-        """Get a list of build variant statuses."""
+        """Get a list of build variant statuses."""
         if "build_variants_status" not in self.json or not self.json["build_variants_status"]:
             return []
         build_variants_status = self.json["build_variants_status"]
@@ -184,11 +186,11 @@ 

Source code for evergreen.version

 
     @property
     def requester(self) -> Requester:
-        """Get the requester of this version."""
+        """Get the requester of this version."""
         return Requester[self.json.get("requester", "UNKNOWN").upper()]
 
 
[docs] def build_by_variant(self, build_variant: str) -> "Build": - """ + """ Get a build object for the specified variant. :param build_variant: Build variant to get build for. @@ -197,7 +199,7 @@

Source code for evergreen.version

         return self._api.build_by_id(self.build_variants_map[build_variant])
[docs] def get_manifest(self) -> "Manifest": - """ + """ Get the manifest for this version. :return: Manifest for this version. @@ -205,7 +207,7 @@

Source code for evergreen.version

         return self._api.manifest(self.project, self.revision)
[docs] def get_modules(self) -> Optional[Dict[str, ManifestModule]]: - """ + """ Get the modules for this version. :return: ManifestModules for this version. @@ -213,7 +215,7 @@

Source code for evergreen.version

         return self.get_manifest().modules
[docs] def get_builds(self) -> List["Build"]: - """ + """ Get all the builds that are a part of this version. :return: List of build that are a part of this version. @@ -221,7 +223,7 @@

Source code for evergreen.version

         return self._api.builds_by_version(self.version_id)
[docs] def is_patch(self) -> bool: - """ + """ Determine if this version from a patch build. :return: True if this version is a patch build. @@ -231,7 +233,7 @@

Source code for evergreen.version

         return not self.version_id.startswith(self.project.replace("-", "_"))
[docs] def is_completed(self) -> bool: - """ + """ Determine if this version has completed running tasks. :return: True if version has completed. @@ -239,7 +241,7 @@

Source code for evergreen.version

         return self.status in COMPLETED_STATES
[docs] def get_patch(self) -> Optional["Patch"]: - """ + """ Get the patch information for this version. :return: Patch for this version. @@ -249,7 +251,7 @@

Source code for evergreen.version

         return None
[docs] def get_metrics(self, task_filter_fn: Optional[Callable] = None) -> Optional[VersionMetrics]: - """ + """ Calculate the metrics for this version. Metrics are only available on versions that have finished running. @@ -263,7 +265,7 @@

Source code for evergreen.version

         return None
def __repr__(self) -> str: - """ + """ Get the string representation of Version for debugging purposes. :return: String representation of Version. @@ -272,30 +274,30 @@

Source code for evergreen.version

 
 
 
[docs]class RecentVersionRow(_BaseEvergreenObject): - """Wrapper for a row of the RecentVersions endpoint.""" + """Wrapper for a row of the RecentVersions endpoint.""" build_variant = evg_attrib("build_variant") @property def builds(self) -> Dict[str, Build]: - """Get a map of build IDs to build objects.""" + """Get a map of build IDs to build objects.""" return {k: Build(v, self._api) for k, v in self.json["builds"].items()}
[docs]class RecentVersions(_BaseEvergreenObject): - """Wrapper for the data object returned by /projects/{project_id}/recent_versions.""" + """Wrapper for the data object returned by /projects/{project_id}/recent_versions.""" rows = evg_attrib("rows") build_variants = evg_attrib("build_variants") @property def row_map(self) -> Dict[str, RecentVersionRow]: - """Get a map of build names to RecentVersionRows.""" + """Get a map of build names to RecentVersionRows.""" return {k: RecentVersionRow(v, self._api) for k, v in self.json["rows"].items()} @property def versions(self) -> List[Version]: - """ + """ Get the list of versions from the recent versions response object. :return: List of versions from the response object @@ -319,19 +321,19 @@

Source code for evergreen.version

   

Quick search

- +
diff --git a/_modules/index.html b/_modules/index.html index 99c8b92e..d661168b 100644 --- a/_modules/index.html +++ b/_modules/index.html @@ -1,17 +1,19 @@ - + - Overview: module code — evergreen.py 3.6.19 documentation - - - + Overview: module code — evergreen.py 3.6.20 documentation + + + + + @@ -82,19 +84,19 @@

All modules for which code is available

Quick search

- +
diff --git a/_static/_sphinx_javascript_frameworks_compat.js b/_static/_sphinx_javascript_frameworks_compat.js new file mode 100644 index 00000000..8549469d --- /dev/null +++ b/_static/_sphinx_javascript_frameworks_compat.js @@ -0,0 +1,134 @@ +/* + * _sphinx_javascript_frameworks_compat.js + * ~~~~~~~~~~ + * + * Compatability shim for jQuery and underscores.js. + * + * WILL BE REMOVED IN Sphinx 6.0 + * xref RemovedInSphinx60Warning + * + */ + +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + + +/** + * 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/_static/basic.css b/_static/basic.css index b3bdc004..4e9a9f1f 100644 --- a/_static/basic.css +++ b/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -130,7 +130,7 @@ ul.search li a { font-weight: bold; } -ul.search li div.context { +ul.search li p.context { color: #888; margin: 2px 0 0 30px; text-align: left; @@ -222,7 +222,7 @@ table.modindextable td { /* -- general body styles --------------------------------------------------- */ div.body { - min-width: 450px; + min-width: 360px; max-width: 800px; } @@ -237,16 +237,6 @@ a.headerlink { visibility: hidden; } -a.brackets:before, -span.brackets > a:before{ - content: "["; -} - -a.brackets:after, -span.brackets > a:after { - content: "]"; -} - h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, @@ -334,13 +324,15 @@ aside.sidebar { 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; @@ -379,6 +371,8 @@ div.body p.centered { 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; @@ -386,6 +380,8 @@ div.admonition > :last-child { div.sidebar::after, aside.sidebar::after, +nav.contents::after, +aside.topic::after, div.topic::after, div.admonition::after, blockquote::after { @@ -428,10 +424,6 @@ table.docutils td, table.docutils th { border-bottom: 1px solid #aaa; } -table.footnote td, table.footnote th { - border: 0 !important; -} - th { text-align: left; padding-right: 5px; @@ -508,6 +500,63 @@ 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 ----------------------------------------------------- */ @@ -557,20 +606,26 @@ ol.simple p, ul.simple p { margin-bottom: 0; } - -dl.footnote > dt, -dl.citation > dt { +aside.footnote > span, +div.citation > span { float: left; - margin-right: 0.5em; } - -dl.footnote > dd, -dl.citation > dd { +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; } - -dl.footnote > dd:after, -dl.citation > dd:after { +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { content: ""; clear: both; } @@ -587,10 +642,6 @@ dl.field-list > dt { padding-right: 5px; } -dl.field-list > dt:after { - content: ":"; -} - dl.field-list > dd { padding-left: 0.5em; margin-top: 0em; @@ -634,14 +685,6 @@ dl.glossary dt { font-size: 1.1em; } -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - .versionmodified { font-style: italic; } @@ -682,8 +725,9 @@ dl.glossary dt { .classifier:before { font-style: normal; - margin: 0.5em; + margin: 0 0.5em; content: ":"; + display: inline-block; } abbr, acronym { @@ -707,6 +751,7 @@ span.pre { -ms-hyphens: none; -webkit-hyphens: none; hyphens: none; + white-space: nowrap; } div[class*="highlight-"] { @@ -770,8 +815,12 @@ div.code-block-caption code { table.highlighttable td.linenos, span.linenos, -div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ - user-select: none; +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 { @@ -786,16 +835,6 @@ div.literal-block-wrapper { margin: 1em 0; } -code.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -code.descclassname { - background-color: transparent; -} - code.xref, a code { background-color: transparent; font-weight: bold; diff --git a/_static/doctools.js b/_static/doctools.js index 61ac9d26..527b876c 100644 --- a/_static/doctools.js +++ b/_static/doctools.js @@ -2,320 +2,155 @@ * doctools.js * ~~~~~~~~~~~ * - * Sphinx JavaScript utilities for all documentation. + * Base JavaScript utilities for all Sphinx HTML documentation. * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * 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]; +"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); } - 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; -} - /** * Small JavaScript module for the documentation. */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { - this.initOnKeyListeners(); - } +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); }, /** * i18n support */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, - LOCALE : 'unknown', + 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 : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated === 'undefined') - return string; - return (typeof translated === 'string') ? translated : translated[0]; + 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 : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated === 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; + 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 : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; }, /** - * add context elements like header anchor links + * helper function to focus on search bar */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); }, /** - * workaround a firefox stupidity - * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 + * Initialise the domain index toggle buttons */ - fixFirefoxAnchorBug : function() { - if (document.location.hash && $.browser.mozilla) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); + 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 = "")); } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) === 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, + }; - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this === '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + 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: function() { - $(document).keydown(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box, textarea, dropdown or button - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' - && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey - && !event.shiftKey) { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; + 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(); } - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; + 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 -_ = Documentation.gettext; +const _ = Documentation.gettext; -$(document).ready(function() { - Documentation.init(); -}); +_ready(Documentation.init); diff --git a/_static/documentation_options.js b/_static/documentation_options.js index e96f0e49..ab5de8be 100644 --- a/_static/documentation_options.js +++ b/_static/documentation_options.js @@ -1,12 +1,14 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '3.6.19', - LANGUAGE: 'None', + VERSION: '3.6.20', + LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', FILE_SUFFIX: '.html', LINK_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt', - NAVIGATION_WITH_KEYS: false + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, }; \ No newline at end of file diff --git a/_static/jquery-3.5.1.js b/_static/jquery-3.6.0.js similarity index 98% rename from _static/jquery-3.5.1.js rename to _static/jquery-3.6.0.js index 50937333..fc6c299b 100644 --- a/_static/jquery-3.5.1.js +++ b/_static/jquery-3.6.0.js @@ -1,15 +1,15 @@ /*! - * jQuery JavaScript Library v3.5.1 + * jQuery JavaScript Library v3.6.0 * https://jquery.com/ * * Includes Sizzle.js * https://sizzlejs.com/ * - * Copyright JS Foundation and other contributors + * Copyright OpenJS Foundation and other contributors * Released under the MIT license * https://jquery.org/license * - * Date: 2020-05-04T22:49Z + * Date: 2021-03-02T17:08Z */ ( function( global, factory ) { @@ -76,12 +76,16 @@ var support = {}; var isFunction = function isFunction( obj ) { - // Support: Chrome <=57, Firefox <=52 - // In some browsers, typeof returns "function" for HTML elements - // (i.e., `typeof document.createElement( "object" ) === "function"`). - // We don't want to classify *any* DOM node as a function. - return typeof obj === "function" && typeof obj.nodeType !== "number"; - }; + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 + // Plus for old WebKit, typeof returns "function" for HTML collections + // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) + return typeof obj === "function" && typeof obj.nodeType !== "number" && + typeof obj.item !== "function"; + }; var isWindow = function isWindow( obj ) { @@ -147,7 +151,7 @@ function toType( obj ) { var - version = "3.5.1", + version = "3.6.0", // Define a local copy of jQuery jQuery = function( selector, context ) { @@ -401,7 +405,7 @@ jQuery.extend( { if ( isArrayLike( Object( arr ) ) ) { jQuery.merge( ret, typeof arr === "string" ? - [ arr ] : arr + [ arr ] : arr ); } else { push.call( ret, arr ); @@ -496,9 +500,9 @@ if ( typeof Symbol === "function" ) { // Populate the class2type map jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( _i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); + function( _i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); + } ); function isArrayLike( obj ) { @@ -518,14 +522,14 @@ function isArrayLike( obj ) { } var Sizzle = /*! - * Sizzle CSS Selector Engine v2.3.5 + * Sizzle CSS Selector Engine v2.3.6 * https://sizzlejs.com/ * * Copyright JS Foundation and other contributors * Released under the MIT license * https://js.foundation/ * - * Date: 2020-03-14 + * Date: 2021-02-16 */ ( function( window ) { var i, @@ -1108,8 +1112,8 @@ support = Sizzle.support = {}; * @returns {Boolean} True iff elem is a non-HTML XML node */ isXML = Sizzle.isXML = function( elem ) { - var namespace = elem.namespaceURI, - docElem = ( elem.ownerDocument || elem ).documentElement; + var namespace = elem && elem.namespaceURI, + docElem = elem && ( elem.ownerDocument || elem ).documentElement; // Support: IE <=8 // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes @@ -3024,9 +3028,9 @@ var rneedsContext = jQuery.expr.match.needsContext; function nodeName( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); -}; +} var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); @@ -3997,8 +4001,8 @@ jQuery.extend( { resolveContexts = Array( i ), resolveValues = slice.call( arguments ), - // the master Deferred - master = jQuery.Deferred(), + // the primary Deferred + primary = jQuery.Deferred(), // subordinate callback factory updateFunc = function( i ) { @@ -4006,30 +4010,30 @@ jQuery.extend( { resolveContexts[ i ] = this; resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; if ( !( --remaining ) ) { - master.resolveWith( resolveContexts, resolveValues ); + primary.resolveWith( resolveContexts, resolveValues ); } }; }; // Single- and empty arguments are adopted like Promise.resolve if ( remaining <= 1 ) { - adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, + adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, !remaining ); // Use .then() to unwrap secondary thenables (cf. gh-3000) - if ( master.state() === "pending" || + if ( primary.state() === "pending" || isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { - return master.then(); + return primary.then(); } } // Multiple arguments are aggregated like Promise.all array elements while ( i-- ) { - adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); + adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); } - return master.promise(); + return primary.promise(); } } ); @@ -4180,8 +4184,8 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { for ( ; i < len; i++ ) { fn( elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) ); } } @@ -5089,10 +5093,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) { } -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; +var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; function returnTrue() { return true; @@ -5387,8 +5388,8 @@ jQuery.event = { event = jQuery.event.fix( nativeEvent ), handlers = ( - dataPriv.get( this, "events" ) || Object.create( null ) - )[ event.type ] || [], + dataPriv.get( this, "events" ) || Object.create( null ) + )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event @@ -5512,12 +5513,12 @@ jQuery.event = { get: isFunction( hook ) ? function() { if ( this.originalEvent ) { - return hook( this.originalEvent ); + return hook( this.originalEvent ); } } : function() { if ( this.originalEvent ) { - return this.originalEvent[ name ]; + return this.originalEvent[ name ]; } }, @@ -5656,7 +5657,13 @@ function leverageNative( el, type, expectSync ) { // Cancel the outer synthetic event event.stopImmediatePropagation(); event.preventDefault(); - return result.value; + + // Support: Chrome 86+ + // In Chrome, if an element having a focusout handler is blurred by + // clicking outside of it, it invokes the handler synchronously. If + // that handler calls `.remove()` on the element, the data is cleared, + // leaving `result` undefined. We need to guard against this. + return result && result.value; } // If this is an inner synthetic event for an event with a bubbling surrogate @@ -5821,34 +5828,7 @@ jQuery.each( { targetTouches: true, toElement: true, touches: true, - - which: function( event ) { - var button = event.button; - - // Add which for key events - if ( event.which == null && rkeyEvent.test( event.type ) ) { - return event.charCode != null ? event.charCode : event.keyCode; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { - if ( button & 1 ) { - return 1; - } - - if ( button & 2 ) { - return 3; - } - - if ( button & 4 ) { - return 2; - } - - return 0; - } - - return event.which; - } + which: true }, jQuery.event.addProp ); jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { @@ -5874,6 +5854,12 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp return true; }, + // Suppress native focus or blur as it's already being fired + // in leverageNative. + _default: function() { + return true; + }, + delegateType: delegateType }; } ); @@ -6541,6 +6527,10 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); // set in CSS while `offset*` properties report correct values. // Behavior in IE 9 is more subtle than in newer versions & it passes // some versions of this test; make sure not to make it pass there! + // + // Support: Firefox 70+ + // Only Firefox includes border widths + // in computed dimensions. (gh-4529) reliableTrDimensions: function() { var table, tr, trChild, trStyle; if ( reliableTrDimensionsVal == null ) { @@ -6548,17 +6538,32 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); tr = document.createElement( "tr" ); trChild = document.createElement( "div" ); - table.style.cssText = "position:absolute;left:-11111px"; + table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; + tr.style.cssText = "border:1px solid"; + + // Support: Chrome 86+ + // Height set through cssText does not get applied. + // Computed height then comes back as 0. tr.style.height = "1px"; trChild.style.height = "9px"; + // Support: Android 8 Chrome 86+ + // In our bodyBackground.html iframe, + // display for all div elements is set to "inline", + // which causes a problem only in Android 8 Chrome 86. + // Ensuring the div is display: block + // gets around this issue. + trChild.style.display = "block"; + documentElement .appendChild( table ) .appendChild( tr ) .appendChild( trChild ); trStyle = window.getComputedStyle( tr ); - reliableTrDimensionsVal = parseInt( trStyle.height ) > 3; + reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + + parseInt( trStyle.borderTopWidth, 10 ) + + parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; documentElement.removeChild( table ); } @@ -7022,10 +7027,10 @@ jQuery.each( [ "height", "width" ], function( _i, dimension ) { // Running getBoundingClientRect on a disconnected node // in IE throws an error. ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? - swap( elem, cssShow, function() { - return getWidthOrHeight( elem, dimension, extra ); - } ) : - getWidthOrHeight( elem, dimension, extra ); + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, dimension, extra ); + } ) : + getWidthOrHeight( elem, dimension, extra ); } }, @@ -7084,7 +7089,7 @@ jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, swap( elem, { marginLeft: 0 }, function() { return elem.getBoundingClientRect().left; } ) - ) + "px"; + ) + "px"; } } ); @@ -7223,7 +7228,7 @@ Tween.propHooks = { if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); } else if ( tween.elem.nodeType === 1 && ( - jQuery.cssHooks[ tween.prop ] || + jQuery.cssHooks[ tween.prop ] || tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { @@ -7468,7 +7473,7 @@ function defaultPrefilter( elem, props, opts ) { anim.done( function() { - /* eslint-enable no-loop-func */ + /* eslint-enable no-loop-func */ // The final step of a "hide" animation is actually hiding the element if ( !hidden ) { @@ -7588,7 +7593,7 @@ function Animation( elem, properties, options ) { tweens: [], createTween: function( prop, end ) { var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.opts.specialEasing[ prop ] || animation.opts.easing ); animation.tweens.push( tween ); return tween; }, @@ -7761,7 +7766,8 @@ jQuery.fn.extend( { anim.stop( true ); } }; - doAnimation.finish = doAnimation; + + doAnimation.finish = doAnimation; return empty || optall.queue === false ? this.each( doAnimation ) : @@ -8401,8 +8407,8 @@ jQuery.fn.extend( { if ( this.setAttribute ) { this.setAttribute( "class", className || value === false ? - "" : - dataPriv.get( this, "__className__" ) || "" + "" : + dataPriv.get( this, "__className__" ) || "" ); } } @@ -8417,7 +8423,7 @@ jQuery.fn.extend( { while ( ( elem = this[ i++ ] ) ) { if ( elem.nodeType === 1 && ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { - return true; + return true; } } @@ -8707,9 +8713,7 @@ jQuery.extend( jQuery.event, { special.bindType || type; // jQuery handler - handle = ( - dataPriv.get( cur, "events" ) || Object.create( null ) - )[ event.type ] && + handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && dataPriv.get( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); @@ -8856,7 +8860,7 @@ var rquery = ( /\?/ ); // Cross-browser xml parsing jQuery.parseXML = function( data ) { - var xml; + var xml, parserErrorElem; if ( !data || typeof data !== "string" ) { return null; } @@ -8865,12 +8869,17 @@ jQuery.parseXML = function( data ) { // IE throws on parseFromString with invalid input. try { xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) { - xml = undefined; - } + } catch ( e ) {} - if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); + parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; + if ( !xml || parserErrorElem ) { + jQuery.error( "Invalid XML: " + ( + parserErrorElem ? + jQuery.map( parserErrorElem.childNodes, function( el ) { + return el.textContent; + } ).join( "\n" ) : + data + ) ); } return xml; }; @@ -8971,16 +8980,14 @@ jQuery.fn.extend( { // Can add propHook for "elements" to filter or add form elements var elements = jQuery.prop( this, "elements" ); return elements ? jQuery.makeArray( elements ) : this; - } ) - .filter( function() { + } ).filter( function() { var type = this.type; // Use .is( ":disabled" ) so that fieldset[disabled] works return this.name && !jQuery( this ).is( ":disabled" ) && rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && ( this.checked || !rcheckableType.test( type ) ); - } ) - .map( function( _i, elem ) { + } ).map( function( _i, elem ) { var val = jQuery( this ).val(); if ( val == null ) { @@ -9033,7 +9040,8 @@ var // Anchor tag for parsing the document origin originAnchor = document.createElement( "a" ); - originAnchor.href = location.href; + +originAnchor.href = location.href; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { @@ -9414,8 +9422,8 @@ jQuery.extend( { // Context for global events is callbackContext if it is a DOM node or jQuery collection globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, + jQuery( callbackContext ) : + jQuery.event, // Deferreds deferred = jQuery.Deferred(), @@ -9727,8 +9735,10 @@ jQuery.extend( { response = ajaxHandleResponses( s, jqXHR, responses ); } - // Use a noop converter for missing script - if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) { + // Use a noop converter for missing script but not if jsonp + if ( !isSuccess && + jQuery.inArray( "script", s.dataTypes ) > -1 && + jQuery.inArray( "json", s.dataTypes ) < 0 ) { s.converters[ "text script" ] = function() {}; } @@ -10466,12 +10476,6 @@ jQuery.offset = { options.using.call( elem, props ); } else { - if ( typeof props.top === "number" ) { - props.top += "px"; - } - if ( typeof props.left === "number" ) { - props.left += "px"; - } curElem.css( props ); } } @@ -10640,8 +10644,11 @@ jQuery.each( [ "top", "left" ], function( _i, prop ) { // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { - jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, - function( defaultExtra, funcName ) { + jQuery.each( { + padding: "inner" + name, + content: type, + "": "outer" + name + }, function( defaultExtra, funcName ) { // Margin is only for outerHeight, outerWidth jQuery.fn[ funcName ] = function( margin, value ) { @@ -10726,7 +10733,8 @@ jQuery.fn.extend( { } } ); -jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + +jQuery.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( _i, name ) { @@ -10737,7 +10745,8 @@ jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + this.on( name, null, data, fn ) : this.trigger( name ); }; - } ); + } +); diff --git a/_static/jquery.js b/_static/jquery.js index b0614034..c4c6022f 100644 --- a/_static/jquery.js +++ b/_static/jquery.js @@ -1,2 +1,2 @@ -/*! jQuery v3.5.1 | (c) JS 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},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.5.1",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.namespaceURI,n=(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},D=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 D(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||j,"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,j=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 qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(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 Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.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(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.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,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.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):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),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]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.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+~]|"+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 { + const [docname, title, anchor, descr, score, filename] = result + return score }, */ @@ -28,9 +30,11 @@ if (!Scorer) { // 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 + 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, @@ -39,452 +43,495 @@ if (!Scorer) { partialTitle: 7, // query found in terms term: 5, - partialTerm: 2 + partialTerm: 2, }; } -if (!splitQuery) { - function splitQuery(query) { - return query.split(/\s+/); +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 */ -var Search = { - - _index : null, - _queued_query : null, - _pulse_status : -1, - - htmlToText : function(htmlString) { - var virtualDocument = document.implementation.createHTMLDocument('virtual'); - var htmlElement = $(htmlString, virtualDocument); - htmlElement.find('.headerlink').remove(); - docContent = htmlElement.find('[role=main]')[0]; - if(docContent === undefined) { - console.warn("Content block not found. Sphinx search tries to obtain it " + - "via '[role=main]'. Could you check your theme or template."); - return ""; - } - return docContent.textContent || docContent.innerText; +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 : function() { - var params = $.getQueryParameters(); - if (params.q) { - var query = params.q[0]; - $('input[name="q"]')[0].value = query; - this.performSearch(query); - } + 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 : function(url) { - $.ajax({type: "GET", url: url, data: null, - dataType: "script", cache: true, - complete: function(jqxhr, textstatus) { - if (textstatus != "success") { - document.getElementById("searchindexloader").src = url; - } - }}); - }, + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), - setIndex : function(index) { - var q; - this._index = index; - if ((q = this._queued_query) !== null) { - this._queued_query = null; - Search.query(q); + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); } }, - hasIndex : function() { - return this._index !== null; - }, + hasIndex: () => Search._index !== null, - deferQuery : function(query) { - this._queued_query = query; - }, + deferQuery: (query) => (Search._queued_query = query), - stopPulse : function() { - this._pulse_status = 0; - }, + stopPulse: () => (Search._pulse_status = -1), - startPulse : function() { - if (this._pulse_status >= 0) - return; - function pulse() { - var i; + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { Search._pulse_status = (Search._pulse_status + 1) % 4; - var dotString = ''; - for (i = 0; i < Search._pulse_status; i++) - dotString += '.'; - Search.dots.text(dotString); - if (Search._pulse_status > -1) - window.setTimeout(pulse, 500); - } + 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 : function(query) { + performSearch: (query) => { // create the required interface elements - this.out = $('#search-results'); - this.title = $('

' + _('Searching') + '

').appendTo(this.out); - this.dots = $('').appendTo(this.title); - this.status = $('

 

').appendTo(this.out); - this.output = $('