Skip to content

Commit

Permalink
Merge pull request #6 from Watz-Inc/misc
Browse files Browse the repository at this point in the history
Doc 404, doc outdated header, docstrings
  • Loading branch information
zakstucke authored Oct 9, 2023
2 parents 3e53c8f + d8300a0 commit cc46bce
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 4 deletions.
12 changes: 12 additions & 0 deletions docs/assets/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- MANUAL: add this directly to the docs-site branch where its needed -->
<!-- This currently always redirects to the latest version which isn't ideal, but should be sorted eventually as the issue is recent -->
<!-- (the solution in the issue hardcodes the versions which isn't worth it) -->
<!-- https://github.com/jimporter/mike/issues/72 -->

<script>
const defaultVersion = "latest";
const basePath = "watz-py";
const targetRedirectPath = "404"; // path to redirect to, relative to basePath

window.location.href = `/${basePath}/${defaultVersion}/${targetRedirectPath}`;
</script>
Binary file removed docs/assets/images/watz-py-0.0.1.zip
Binary file not shown.
6 changes: 6 additions & 0 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% extends "base.html" %} {% block outdated %} You're not viewing the latest
version.
<a href="{{ '../' ~ base_url }}">
<strong>Click here to go to latest.</strong>
</a>
{% endblock %}
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ extra_css:

theme:
name: "material"
custom_dir: docs/overrides
features:
- navigation.instant
- navigation.instant.progress
Expand Down
2 changes: 2 additions & 0 deletions watz.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"files.exclude": {
"**/.venv/**": true,
"**/venv/**": true,
"**/.nox/**": true,
"**/coverage": true,
"**/htmlcov": true,
"**/__pycache__": true,
Expand All @@ -59,6 +60,7 @@
"files.watcherExclude": {
"**/.venv/**": true,
"**/venv/**": true,
"**/.nox/**": true,
"**/coverage": true,
"**/htmlcov": true,
"**/__pycache__": true,
Expand Down
8 changes: 4 additions & 4 deletions watz/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def trace_list(self, nids: tp.Iterable[str]) -> RespTraceList:
"""Retrieves the trace metadata for the requested nodes.
Args:
nids (tp.Iterable[str]): The node ids to retrieve trace metadata for.
nids (list[str]): The node ids to retrieve trace metadata for.
Returns:
RespTraceList
Expand All @@ -89,7 +89,7 @@ def trace_data(self, traces: tp.Mapping[str, tp.Iterable[str]]) -> RespTraceData
"""Retrieves the trace data for the request traces.
Args:
traces (tp.Mapping[str, tp.Iterable[str]]): A dict of node ids to a list of trace identifiers for each respective node.
traces (dict[str, list[str]]): A dict of node ids to a list of trace identifiers for each respective node.
Returns:
RespTraceData
Expand All @@ -109,7 +109,7 @@ def create_nodes(
"""Creates new nodes.
Args:
nodes (tp.Iterable[tp.Union[CreateActivityNode, CreateUserNode]]): The nodes to create.
nodes (list[tp.Union[CreateActivityNode, CreateUserNode]]): The nodes to create.
Returns:
RespCreateNodes
Expand All @@ -127,7 +127,7 @@ def create_traces(self, traces: tp.Mapping[str, tp.Iterable[CreateTrace]]) -> Re
"""Creates new traces.
Args:
traces (tp.Mapping[str, tp.Iterable[CreateTrace]]): A dict of node ids to a list of traces to create for each respective node.
traces (dict[str, tp.Iterable[CreateTrace]]): A dict of node ids to a list of traces to create for each respective node.
Returns:
RespCreateTraces
Expand Down

0 comments on commit cc46bce

Please sign in to comment.