Skip to content

Commit ea99402

Browse files
committed
update
1 parent 160cfc5 commit ea99402

File tree

4 files changed

+65
-15
lines changed

4 files changed

+65
-15
lines changed

.gitignore

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,12 @@ __pycache__
1414
.vscode/
1515

1616
# build related
17-
build
18-
dist/
19-
_version.py
2017
_site
18+
notebooks.egg-info
2119

2220
# notebooks
2321
.ipynb_checkpoints
2422

2523
# virtual environment
2624
env/
2725
venv/
28-
29-
# testing
30-
.pytest_cache
31-
32-
# coverage
33-
.coverage
34-
coverage
35-
coverage.xml
36-
nosetests_coverage/

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,20 @@
22

33
The structure of this repository is mostly adapted from
44
the [marimo template repo](https://github.com/marimo-team/marimo-gh-pages-template).
5+
6+
## 🧪 Testing
7+
8+
To test the export process, run `scripts/build.py` from the root directory.
9+
10+
```bash
11+
tox run -e build
12+
```
13+
14+
This will export all notebooks in a folder called `_site/` in the root directory.
15+
Then to serve the site, run:
16+
17+
```bash
18+
python -m http.server -d _site
19+
```
20+
21+
This will serve the site at `http://localhost:8000`.

scripts/build.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,12 @@ def generate_index(all_notebooks: list[str], output_dir: str) -> None:
5959
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet">
6060
</head>
6161
<body class="font-sans max-w-2xl mx-auto p-8 leading-relaxed">
62-
<div class="mb-8">
63-
<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg" alt="marimo" class="h-20" />
64-
</div>
62+
<div class="mb-8 flex">
63+
<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/marimo-logotype-thick.svg"
64+
alt="marimo" class="h-20 flex-1" />
65+
<img src="https://raw.githubusercontent.com/nilearn/nilearn/refs/heads/main/doc/logos/nilearn-logo.svg"
66+
alt="marimo" class="h-20 flex-1" />
67+
</div>
6568
<div class="grid gap-4">
6669
"""
6770
)

tox.ini

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
; See https://tox.wiki/en/4.23.2/
2+
[tox]
3+
requires =
4+
tox>=4
5+
; run lint by default when just calling "tox"
6+
env_list = lint
7+
8+
; ENVIRONMENTS
9+
; ------------
10+
[style]
11+
description = common environment for style checkers (rely on pre-commit hooks)
12+
skip_install = true
13+
deps =
14+
pre-commit
15+
16+
[global_var]
17+
passenv =
18+
USERNAME
19+
# Pass user color preferences through
20+
PY_COLORS
21+
FORCE_COLOR
22+
NO_COLOR
23+
CLICOLOR
24+
CLICOLOR_FORCE
25+
26+
; COMMANDS
27+
; --------
28+
[testenv:lint]
29+
description = Run all linters and formatters.
30+
skip_install = true
31+
commands =
32+
pre-commit run --all-files --show-diff-on-failure {posargs:}
33+
34+
[testenv:build]
35+
description = Run tests on latest version of all dependencies.
36+
passenv = {[global_var]passenv}
37+
deps =
38+
marimo
39+
commands =
40+
python scripts/build.py
41+

0 commit comments

Comments
 (0)