Skip to content

Commit 767e933

Browse files
Update to v0.0.3, improve docs and fix css issues.
1 parent 55e7893 commit 767e933

File tree

4 files changed

+33
-12
lines changed

4 files changed

+33
-12
lines changed

diplomat/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
A tool providing multi-animal tracking capabilities on top of other Deep learning based tracking software.
33
"""
44

5-
__version__ = "0.0.2"
5+
__version__ = "0.0.3"
66
# Can be used by functions to determine if diplomat was invoked through it's CLI interface.
77
CLI_RUN = False
88

docs/source/_static/css/custom.css

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,20 @@ p {
6969
/*--navbar-level-1-color: #c3e3ff;*/
7070
/*--navbar-level-2-color: #b8d6f0;*/
7171
/*--navbar-level-3-color: #a3c4e1;*/
72-
--navbar-level-1-color: cadetblue;
73-
--navbar-level-2-color: cadetblue;
74-
--navbar-level-3-color: cadetblue;
72+
--navbar-level-1-color: steelblue;
73+
--navbar-level-2-color: steelblue;
74+
--navbar-level-3-color: steelblue;
7575

7676
--navbar-heading-color: #ff7381;
7777

7878
/*--navbar-scrollbar-color: #d45a66;*/
7979
/*--navbar-scrollbar-hover-color: #b14550;*/
8080
/*--navbar-scrollbar-active-color: #72383e;*/
8181
/*--navbar-scrollbar-background: #131e2b;*/
82-
--navbar-scrollbar-color: cadetblue;
83-
--navbar-scrollbar-hover-color: #558e90;
84-
--navbar-scrollbar-active-color: #426e70;
85-
--navbar-scrollbar-background: #131e2b;
82+
--navbar-scrollbar-color: steelblue;
83+
--navbar-scrollbar-hover-color: #5f9fd4;
84+
--navbar-scrollbar-active-color: #31609e;
85+
--navbar-scrollbar-background: #cacaca;
8686

8787
--link-color: #2980b9;
8888
--link-color-hover: #3091d1;
@@ -108,8 +108,7 @@ p {
108108
--search-credits-link-color: #4392c5; /* derived from --link-color */
109109

110110

111-
112-
--highlight-background-color: #efefef;
111+
--highlight-background-color: #efefef;
113112
--highlight-background-emph-color: #dbe6c3;
114113
--highlight-default-color: #404040;
115114
--highlight-comment-color: #408090;
@@ -135,9 +134,9 @@ p {
135134
--admonition-danger-color: #404040;
136135
--admonition-danger-title-background-color: #e9a499;
137136
--admonition-danger-title-color: #fff;
138-
--admonition-tip-background-color: #dbfaf4;
137+
--admonition-tip-background-color: #dbf0fa;
139138
--admonition-tip-color: #404040;
140-
--admonition-tip-title-background-color: #1abc9c;
139+
--admonition-tip-title-background-color: #1a95bc;
141140
--admonition-tip-title-color: #fff;
142141

143142
--kbd-background-color: #fafbfc;
@@ -153,6 +152,10 @@ p {
153152
--footer-color: #808080;
154153
}
155154

155+
.icon-home {
156+
color: var(--link-color) !important;
157+
}
158+
156159
/*!* Dark theme colors *!*/
157160
/*@media (prefers-color-scheme: dark) {*/
158161
/* :root {*/
@@ -594,6 +597,9 @@ footer,
594597

595598
.wy-nav-content {
596599
background-color: var(--content-background-color);
600+
z-index: 300;
601+
box-shadow: 0 0 7px -3px black;
602+
position: relative;
597603
}
598604

599605
.wy-body-for-nav {
@@ -966,6 +972,7 @@ kbd.compound > .kbd,
966972

967973
.wy-nav-side {
968974
background-color: var(--navbar-background-color);
975+
box-shadow: 0 0 7px -3px black;
969976
}
970977

971978
@media only screen and (min-width: 769px) {

docs/source/_templates/cli-entry-template.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
1212
{usage}
1313

14+
{positional_arguments}
15+
1416
.. rubric:: Options
1517

1618
.. code-block:: text

docs/source/ext/plugin_docgen.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,17 @@ def write_cli_entry(cli_dir: Path, cmd_name: str, func) -> Tuple[str, str]:
339339

340340
help_str = func_to_command(func, ArgumentParser(prog=cmd_name)).format_help()
341341
options = "\n".join(f" {line}" for line in help_str.split("options:")[-1].split("\n"))
342+
343+
pos_split = help_str.split("positional arguments:")
344+
if(len(pos_split) < 2):
345+
positional_arguments = ""
346+
else:
347+
positional_arguments = (
348+
" .. rubric:: Positional Arguments\n\n"
349+
" .. code-block:: text\n\n"
350+
+ ("\n".join(f" {line}" for line in pos_split[-1].split("options:")[0].split("\n")))
351+
)
352+
342353
summary = "\n".join(f" {line}" for line in help_str.split("\n\n")[1].split("\n"))
343354
usage = "\n".join(f" {line[7:] if(line.startswith('usage: ')) else line}" for line in help_str.split("\n\n")[0].split("\n"))
344355

@@ -348,6 +359,7 @@ def write_cli_entry(cli_dir: Path, cmd_name: str, func) -> Tuple[str, str]:
348359
title_dash="-" * (len(cmd_name) + 4),
349360
summary=summary,
350361
options=options,
362+
positional_arguments=positional_arguments,
351363
usage=usage
352364
))
353365

0 commit comments

Comments
 (0)