Skip to content

Commit b940565

Browse files
authored
chore: ✅ placeholder code and tests so workflows run (#72)
# Description This allows the workflows and `just run-all` to run, plus gets the quartodocs to work properly and not mess up the `_quarto.yml`. Needs a quick review. ## Checklist - [x] Ran `just run-all`
1 parent bbace66 commit b940565

File tree

5 files changed

+66
-25
lines changed

5 files changed

+66
-25
lines changed

_quarto.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ quartodoc:
6666
style: _renderer.py
6767
table_style: description-list
6868
show_signature_annotations: true
69+
sections:
70+
- title: CLI functions
71+
desc: "Functions available via the command line interface."
72+
contents:
73+
- build
74+
- view
6975

7076
metadata-files:
7177
- docs/reference/_sidebar.yml

src/seedcase_flower/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
"""Module containing all source code."""
2+
3+
from .cli import build, view
4+
5+
__all__ = ["build", "view"]

src/seedcase_flower/cli.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""Module containing only the functions for the exposed CLI."""
2+
3+
from pathlib import Path
4+
5+
6+
def build() -> Path:
7+
"""Build human-friendly documentation from a `datapackage.json` file."""
8+
# mypy doesn't like returning None (design is to return None)
9+
return Path(".")
10+
11+
12+
def view() -> str:
13+
"""Display the contents of a `datapackage.json` to the Terminal in a human-friendly way."""
14+
return ""

tests/test_cli.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""These are integration tests for the CLI commands."""
2+
3+
from pathlib import Path
4+
5+
from seedcase_flower.cli import build, view
6+
7+
8+
def test_build() -> None:
9+
"""Test the build CLI function."""
10+
result = build()
11+
assert result == Path(".")
12+
13+
14+
def test_view() -> None:
15+
"""Test the view CLI function."""
16+
result = view()
17+
assert result == ""

uv.lock

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)