Skip to content

Commit 016f5f6

Browse files
authored
chore: Api styling, moved unity model (#65)
* Add material styling, fixed typing in unity * Moved unity model back into models subpackage
1 parent e4757d4 commit 016f5f6

File tree

17 files changed

+82
-35
lines changed

17 files changed

+82
-35
lines changed

.github/workflows/build-docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
workflow_dispatch:
77
workflow_call:
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
build:
1115
name: Build

.github/workflows/build-models.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
branches:
77
- main
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
build:
1115
name: Build

.github/workflows/static-analysis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
branches:
77
- main
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
analyze:
1115
name: Analyze

docs/api/unity.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: vbl_aquarium.models.unity

docs/api/unity_models.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/stylesheets/mkdocstrings.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/* Indentation. */
2+
div.doc-contents:not(.first) {
3+
padding-left: 25px;
4+
border-left: .05rem solid var(--md-typeset-table-color);
5+
}
6+
7+
/* Mark external links as such. */
8+
a.external::after,
9+
a.autorefs-external::after {
10+
/* https://primer.style/octicons/arrow-up-right-24 */
11+
mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path></svg>');
12+
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path></svg>');
13+
content: ' ';
14+
15+
display: inline-block;
16+
vertical-align: middle;
17+
position: relative;
18+
19+
height: 1em;
20+
width: 1em;
21+
background-color: currentColor;
22+
}
23+
24+
a.external:hover::after,
25+
a.autorefs-external:hover::after {
26+
background-color: var(--md-accent-fg-color);
27+
}

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ theme:
4747
- toc.follow
4848
extra_css:
4949
- stylesheets/extra.css
50+
- stylesheets/mkdocstrings.css
5051
markdown_extensions:
5152
- admonition
5253
- attr_list
@@ -89,5 +90,5 @@ nav:
8990
- API:
9091
- api/index.md
9192
- "VBL Base Model": api/vbl_base_model.md
92-
- "Unity": api/unity_models.md
93+
- "Unity": api/unity.md
9394
- "Ephys Link": api/ephys_link.md

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,15 @@ python = "3.13.1"
5858
skip-install = true
5959
dependencies = [
6060
"mkdocs-material==9.5.49",
61-
"mkdocstrings-python==1.12.2",
61+
"mkdocstrings-python==1.13.0",
6262
]
6363
[tool.hatch.envs.docs.scripts]
6464
serve = "mkdocs serve"
6565
build = "mkdocs build"
6666

6767
[tool.basedpyright]
6868
include = ["src/vbl_aquarium"]
69-
exclude = ["src/vbl_aquarium/old_build.py", "src/vbl_aquarium/old_generate_cs.py"]
7069
strict = ["src/vbl_aquarium"]
7170

72-
[tool.ruff.lint]
73-
ignore = ["A003", "EM101", "FBT002", "T201", "TCH001", "TRY002", "TRY003"]
71+
#[tool.ruff.lint]
72+
#ignore = ["A003", "EM101", "FBT002", "T201", "TCH001", "TRY002", "TRY003"]

src/vbl_aquarium/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.0b0"
1+
__version__ = "1.0.0b1"

src/vbl_aquarium/build.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535

3636
# Look for all modules under the models subpackage.
3737
for module in iter_modules([MODELS_DIRECTORY]):
38+
# Skip Unity module since it's already built into Unity.
39+
if module.name == "unity":
40+
continue
41+
3842
# Collect classes.
3943
imported_module = import_module(f"vbl_aquarium.models.{module.name}")
4044
module_classes = get_model_classes(imported_module)

0 commit comments

Comments
 (0)