Skip to content

Commit a716a86

Browse files
authored
Merge pull request #37 from machow/examples-dascore
Examples dascore
2 parents 50b9396 + f38ad4b commit a716a86

File tree

6 files changed

+236
-2
lines changed

6 files changed

+236
-2
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ jobs:
7878
run: |
7979
python -m pip install -r requirements-dev.txt
8080
python -m pip install .
81+
# TODO: temporary installs for examples
82+
# once quartodoc is stable we should move into their own libraries
8183
python -m pip install shiny shinylive
84+
python -m pip install --no-deps dascore
8285
- uses: quarto-dev/quarto-actions/setup@v2
8386
- name: Build docs
8487
run: |

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ docs/examples/%: examples/%/_site
1313
rm -rf docs/examples/$*
1414
cp -rv $< $@
1515

16-
docs-build-examples: docs/examples/single-page docs/examples/pkgdown docs/examples/shiny
16+
docs-build-examples: docs/examples/single-page docs/examples/pkgdown docs/examples/shiny docs/examples/dascore
1717

1818
docs-build: docs-build-examples
1919
cd docs && quarto add --no-prompt ..

examples/dascore/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/.quarto/
2+
3+
_site
4+
reference
5+
objects.json

examples/dascore/_quarto.yml

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
project:
2+
type: website
3+
4+
filters:
5+
- interlinks
6+
7+
website:
8+
title: pkgdown example
9+
navbar:
10+
left:
11+
- file: reference/index.qmd
12+
text: "Reference"
13+
right:
14+
- icon: github
15+
href: https://github.com/machow/quartodoc/tree/main/examples/dascore
16+
17+
format:
18+
html:
19+
theme: cosmo
20+
toc: true
21+
22+
interlinks:
23+
sources:
24+
python:
25+
url: https://docs.python.org/3/
26+
27+
quartodoc:
28+
style: pkgdown
29+
dir: reference
30+
package: dascore
31+
display_name: relative
32+
renderer:
33+
style: markdown
34+
display_name: relative
35+
sections:
36+
- title: clients
37+
desc: ""
38+
contents:
39+
- clients.dirspool.DirectorySpool
40+
- clients.dirspool.DirectorySpool.get_contents
41+
- clients.dirspool.DirectorySpool.select
42+
- clients.dirspool.DirectorySpool.spool_path
43+
- clients.dirspool.DirectorySpool.update
44+
- clients.filespool.FileSpool.update
45+
- title: patch
46+
desc: ""
47+
contents:
48+
- core.patch.Patch
49+
- core.patch.Patch.attrs
50+
- core.patch.Patch.coord_dims
51+
- core.patch.Patch.coords
52+
- core.patch.Patch.data
53+
- core.patch.Patch.dims
54+
- core.patch.Patch.equals
55+
- core.patch.Patch.io
56+
- core.patch.Patch.new
57+
- core.patch.Patch.pipe
58+
- core.patch.Patch.shape
59+
- core.patch.Patch.to_xarray
60+
- core.patch.Patch.tran
61+
- core.patch.Patch.update_attrs
62+
- core.patch.Patch.viz
63+
- title: schema
64+
desc: ""
65+
contents:
66+
- core.schema.SimpleValidator.func
67+
- core.schema.SimpleValidator.validate
68+
- title: spool
69+
desc: ""
70+
contents:
71+
- core.spool.BaseSpool.chunk
72+
- core.spool.BaseSpool.get_contents
73+
- core.spool.BaseSpool.select
74+
- core.spool.BaseSpool.update
75+
- core.spool.DataFrameSpool.chunk
76+
- core.spool.DataFrameSpool.get_contents
77+
- core.spool.DataFrameSpool.new_from_df
78+
- core.spool.DataFrameSpool.select
79+
- core.spool.spool
80+
- core.spool.spool_from_patch
81+
- core.spool.spool_from_patch_list
82+
- core.spool.spool_from_spool
83+
- core.spool.spool_from_str
84+
- title: examples
85+
desc: ""
86+
contents:
87+
- examples.get_example_patch
88+
- examples.get_example_spool
89+
- examples.sin_wave_patch
90+
- examples.spool_to_directory
91+
- title: IO
92+
desc: ""
93+
contents:
94+
- io.core.FiberIO.get_format
95+
- io.core.FiberIO.implements_get_format
96+
- io.core.FiberIO.implements_scan
97+
- io.core.FiberIO.read
98+
- io.core.FiberIO.scan
99+
- io.core.FiberIO.write
100+
- io.core.read
101+
- io.core.scan
102+
- io.dasdae.core.DASDAEV1.get_format
103+
- io.dasdae.core.DASDAEV1.index
104+
- io.dasdae.core.DASDAEV1.read
105+
- io.dasdae.core.DASDAEV1.scan
106+
- io.dasdae.core.DASDAEV1.write
107+
- io.indexer.AbstractIndexer.update
108+
- io.indexer.DirectoryIndexer.clear_cache
109+
- io.indexer.DirectoryIndexer.ensure_path_exists
110+
- io.indexer.DirectoryIndexer.get_contents
111+
- io.indexer.DirectoryIndexer.update
112+
- io.pickle.core.PickleIO.get_format
113+
- io.pickle.core.PickleIO.read
114+
- io.pickle.core.PickleIO.write
115+
- io.tdms.core.TDMSFormatterV4713.get_format
116+
- io.tdms.core.TDMSFormatterV4713.read
117+
- io.tdms.core.TDMSFormatterV4713.scan
118+
- io.tdms.utils.parse_time_stamp
119+
- io.tdms.utils.type_not_supported
120+
- io.terra15.core.Terra15FormatterV4.get_format
121+
- io.terra15.core.Terra15FormatterV4.read
122+
- io.terra15.core.Terra15FormatterV4.scan
123+
- io.wav.core.WavIO.write
124+
- title: Procs
125+
desc: ""
126+
contents:
127+
- proc.aggregate.aggregate
128+
- proc.basic.abs
129+
- proc.basic.normalize
130+
- proc.basic.rename
131+
- proc.basic.squeeze
132+
- proc.basic.transpose
133+
- proc.detrend.detrend
134+
- proc.filter.pass_filter
135+
- proc.resample.decimate
136+
- proc.resample.interpolate
137+
- proc.resample.iresample
138+
- proc.resample.resample
139+
- proc.select.select
140+
- title: Transforms
141+
desc: ""
142+
contents:
143+
- transform.fft.rfft
144+
- transform.spectro.spectrogram
145+
- transform.strain.velocity_to_strain_rate
146+
- title: Utils
147+
desc: ""
148+
contents:
149+
- utils.chunk.ChunkManager.get_instruction_df
150+
- utils.coords.assign_coords
151+
- utils.coords.Coords.get
152+
- utils.coords.Coords.to_nested_dict
153+
- utils.coords.Coords.update
154+
# - utils.docs.compose_docstring
155+
- utils.downloader.fetch
156+
- utils.hdf5.HDFPatchIndexManager.decode_table
157+
- utils.hdf5.HDFPatchIndexManager.encode_table
158+
- utils.hdf5.HDFPatchIndexManager.get_index
159+
- utils.hdf5.HDFPatchIndexManager.has_index
160+
- utils.hdf5.HDFPatchIndexManager.hdf_kwargs
161+
- utils.hdf5.HDFPatchIndexManager.last_updated_timestamp
162+
- utils.hdf5.HDFPatchIndexManager.validate_version
163+
- utils.hdf5.HDFPatchIndexManager.write_update
164+
- utils.mapping.FrozenDict.copy
165+
- utils.misc.all_close
166+
- utils.misc.append_func
167+
- utils.misc.check_evenly_sampled
168+
- utils.misc.get_slice
169+
- utils.misc.iterate
170+
- utils.misc.register_func
171+
- utils.misc.suppress_warnings
172+
- utils.patch.check_patch_attrs
173+
- utils.patch.check_patch_dims
174+
- utils.patch.copy_attrs
175+
- utils.patch.get_default_patch_name
176+
- utils.patch.get_dim_value_from_kwargs
177+
- utils.patch.get_start_stop_step
178+
- utils.patch.merge_patches
179+
- utils.patch.patch_function
180+
- utils.patch.scan_patches
181+
- utils.pd.adjust_segments
182+
- utils.pd.fill_defaults_from_pydantic
183+
- utils.pd.get_column_names_from_dim
184+
- utils.pd.get_dim_names_from_columns
185+
- utils.pd.get_interval_columns
186+
- utils.pd.get_regex
187+
- utils.pd.list_ser_to_str
188+
- utils.pd.yield_slice_from_kwargs
189+
- utils.progress.track
190+
# TODO: some of these were removed from the more recent dascore version
191+
# - utils.time.array_to_datetime64
192+
# - utils.time.array_to_number
193+
# - utils.time.array_to_timedelta64
194+
#- utils.time.datetime_to_float
195+
#- utils.time.float_to_datetime
196+
#- utils.time.float_to_num
197+
#- utils.time.float_to_timedelta64
198+
#- utils.time.get_max_min_times
199+
#- utils.time.get_select_time
200+
#- utils.time.is_datetime64
201+
#- utils.time.pass_time_delta
202+
#- utils.time.series_to_timedelta64_series
203+
#- utils.time.str_to_datetime64
204+
#- utils.time.time_delta_from_str
205+
#- utils.time.to_datetime64
206+
#- utils.time.to_number
207+
#- utils.time.to_timedelta64
208+
#- utils.time.unpack_pandas_time_delta
209+
- title: Vizualization
210+
desc: ""
211+
contents:
212+
- viz.spectrogram.spectrogram
213+
- viz.waterfall.waterfall

examples/dascore/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Building this site
2+
3+
```
4+
make build
5+
```
6+
7+
## Example links
8+
9+
[](:function:`print`)
10+
11+
[](`dascore.clients.dirspool.DirectorySpool`)

quartodoc/autosummary.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,9 @@ def _render_object(self, obj):
391391

392392
# TODO: look up from inventory?
393393
link = self.render_item_link(obj)
394-
if len(docstring_parts):
394+
if len(docstring_parts) and isinstance(
395+
docstring_parts[0], ds.DocstringSectionText
396+
):
395397
# TODO: or canonical_path
396398
description = docstring_parts[0].value
397399
short = description.split("\n")[0]

0 commit comments

Comments
 (0)