Commit a15477b
authored
feat: ✨ add possibility to return example path (#29)
# Description
@lwjohnst86 You will be happy (I think) to hear that I find a use case
for `Example.<name>.path` in our docs. Currently we write
```py
!uv run seedcase-flower view {so.Example.flora.address.value}
```
which would be slightly more convenient as
```py
!uv run seedcase-flower view {so.Example.flora.path}
```
However, the bigger win that I think justifies having this attribute is
that instead of
```py
from pathlib import Path
print(
'```json',
Path(so.Example.flora.address.value).read_text(),
'```',
sep='\n'
)
```
we can simply write
```py
print(
'```json',
so.Example.flora.path.read_text(),
'```',
sep='\n'
)
```
This pattern occurs a few times in the docs so I think it is worth
providing this convenience.
Needs a quick review.
## Checklist
- [x] Ran `just run-all`1 parent 8b79300 commit a15477b
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments