Skip to content
This repository was archived by the owner on Sep 25, 2023. It is now read-only.

Commit ab63007

Browse files
authored
Add docs build job (#536)
The PR adds a `docs_build` process to the PR and Build workflows for this repository. The generated docs are synced to s3 for only the build workflows. Authors: - Jake Awe (https://github.com/AyodeAwe) - AJ Schmidt (https://github.com/ajschmidt8) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Adam Thompson (https://github.com/awthomp) URL: #536
1 parent f768257 commit ab63007

File tree

11 files changed

+120
-60
lines changed

11 files changed

+120
-60
lines changed

.github/workflows/build.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,14 @@ jobs:
4343
branch: ${{ inputs.branch }}
4444
date: ${{ inputs.date }}
4545
sha: ${{ inputs.sha }}
46+
docs-build:
47+
if: ${{ startsWith(github.ref, 'refs/heads/branch-') }}
48+
needs: python-build
49+
secrets: inherit
50+
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
51+
with:
52+
build_type: branch
53+
node_type: "gpu-latest-1"
54+
arch: "amd64"
55+
container_image: "rapidsai/ci:latest"
56+
run_script: "ci/build_docs.sh"

.github/workflows/pr.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- conda-python-build
1717
- conda-python-tests
1818
- conda-notebook-tests
19+
- docs-build
1920
secrets: inherit
2021
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
2122
checks:
@@ -43,3 +44,13 @@ jobs:
4344
arch: "amd64"
4445
container_image: "rapidsai/ci:latest"
4546
run_script: "ci/test_notebooks.sh"
47+
docs-build:
48+
needs: conda-python-build
49+
secrets: inherit
50+
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
51+
with:
52+
build_type: pull-request
53+
node_type: "gpu-latest-1"
54+
arch: "amd64"
55+
container_image: "rapidsai/ci:latest"
56+
run_script: "ci/build_docs.sh"

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ lib64
99
*.fatbin
1010
docs/build
1111
*.ipynb_checkpoints
12+
docs/_html
13+
docs/_text

ci/build_docs.sh

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
# Copyright (c) 2023, NVIDIA CORPORATION.
3+
4+
set -euo pipefail
5+
6+
rapids-logger "Create test conda environment"
7+
. /opt/conda/etc/profile.d/conda.sh
8+
9+
rapids-dependency-file-generator \
10+
--output conda \
11+
--file_key docs \
12+
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml
13+
14+
rapids-mamba-retry env create --force -f env.yaml -n docs
15+
conda activate docs
16+
17+
rapids-print-env
18+
19+
rapids-logger "Downloading artifacts from previous jobs"
20+
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)
21+
VERSION_NUMBER=$(rapids-get-rapids-version-from-git)
22+
23+
rapids-mamba-retry install \
24+
--channel "${PYTHON_CHANNEL}" \
25+
cusignal
26+
27+
rapids-logger "Build Sphinx docs"
28+
pushd docs
29+
sphinx-build -b dirhtml source _html
30+
sphinx-build -b text source _text
31+
popd
32+
33+
34+
if [[ ${RAPIDS_BUILD_TYPE} == "branch" ]]; then
35+
aws s3 sync --delete docs/_html "s3://rapidsai-docs/cusignal/${VERSION_NUMBER}/html"
36+
aws s3 sync --delete docs/_text "s3://rapidsai-docs/cusignal/${VERSION_NUMBER}/txt"
37+
fi

conda/environments/all_cuda-118_arch-x86_64.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@ dependencies:
1313
- notebook
1414
- numba >=0.49.0
1515
- numpy >=1.19,<1.24
16+
- numpydoc
1617
- pre-commit
18+
- pydata-sphinx-theme
1719
- pytest
1820
- pytest-benchmark
1921
- pytest-cov
2022
- pytest-xdist
2123
- python>=3.8,<3.11
2224
- pytorch <=1.12.1
2325
- scipy >=1.6.0
26+
- sphinx-copybutton
27+
- sphinx<6
2428
name: all_cuda-118_arch-x86_64

dependencies.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ files:
88
includes:
99
- checks
1010
- cudatoolkit
11+
- docs
1112
- py_version
1213
- run
1314
- test_notebooks
@@ -29,6 +30,12 @@ files:
2930
includes:
3031
- checks
3132
- py_version
33+
docs:
34+
output: none
35+
includes:
36+
- cudatoolkit
37+
- docs
38+
- py_version
3239
channels:
3340
- rapidsai
3441
- rapidsai-nightly
@@ -60,6 +67,15 @@ dependencies:
6067
- output_types: [conda, requirements]
6168
packages:
6269
- pre-commit
70+
docs:
71+
common:
72+
- output_types: [conda, requirements]
73+
packages:
74+
- ipython
75+
- numpydoc
76+
- pydata-sphinx-theme
77+
- sphinx<6
78+
- sphinx-copybutton
6379
py_version:
6480
specific:
6581
- output_types: conda

docs/source/api.rst

+31-31
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@ cuSignal API Reference
44

55

66
Convolution
7-
============
7+
===========
88

99
Convolve
10-
------------
10+
--------
1111

1212
.. automodule:: cusignal.convolution.convolve
1313
:members:
1414
:undoc-members:
1515

1616
Correlate
17-
------------
17+
---------
1818
.. automodule:: cusignal.convolution.correlate
1919
:members:
2020
:undoc-members:
2121

2222

2323
Modulation/Demodulation
24-
============
24+
=======================
2525

2626
Demodulation
2727
------------
@@ -31,28 +31,28 @@ Demodulation
3131
:undoc-members:
3232

3333
Estimation
34-
============
34+
==========
3535

3636
Kalman Filter
37-
------------
37+
-------------
3838

3939
.. automodule:: cusignal.estimation.filters
4040
:members:
4141
:undoc-members:
4242

4343

4444
Filtering
45-
============
45+
=========
4646

4747
Resample
48-
------------
48+
--------
4949

5050
.. automodule:: cusignal.filtering.resample
5151
:members:
5252
:undoc-members:
5353

5454
FIR Filters
55-
------------
55+
-----------
5656

5757
.. automodule:: cusignal.filtering.filtering.firfilter
5858
:members:
@@ -63,17 +63,17 @@ FIR Filters
6363
:undoc-members:
6464

6565
Channelizer
66-
------------
66+
-----------
6767

6868
.. automodule:: cusignal.filtering.channelize_poly
6969
:members:
7070
:undoc-members:
7171

7272
Filter Design
73-
============
73+
=============
7474

7575
Resample
76-
------------
76+
--------
7777

7878
.. automodule:: cusignal.filter_design.fir_filter_design
7979
:members:
@@ -92,108 +92,108 @@ Peak Finding
9292

9393

9494
Window Functions
95-
============
95+
================
9696

9797
Windows
98-
------------
98+
-------
9999

100100
.. automodule:: cusignal.windows.windows
101101
:members:
102102
:undoc-members:
103103

104104

105105
Waveforms
106-
============
106+
=========
107107

108108
Waveform Generation
109-
------------
109+
-------------------
110110

111111
.. automodule:: cusignal.waveforms.waveforms
112112
:members:
113113
:undoc-members:
114114

115115

116116
Spectrum Analysis
117-
============
117+
=================
118118

119119
Spectral
120-
------------
120+
--------
121121

122122
.. automodule:: cusignal.spectral_analysis.spectral
123123
:members:
124124
:undoc-members:
125125

126126
Acoustics
127-
------------
127+
---------
128128

129129
.. automodule:: cusignal.acoustics.cepstrum
130130
:members:
131131
:undoc-members:
132132

133133

134134
Wavelets
135-
============
135+
========
136136

137137
Wavelets
138-
------------
138+
--------
139139

140140
.. automodule:: cusignal.wavelets.wavelets
141141
:members:
142142
:undoc-members:
143143

144144

145145
B-splines
146-
============
146+
=========
147147

148148
B-splines
149-
------------
149+
---------
150150

151151
.. automodule:: cusignal.bsplines.bsplines
152152
:members:
153153
:undoc-members:
154154

155155

156156
Utilities
157-
============
157+
=========
158158

159159
Array Tools
160-
------------
160+
-----------
161161

162162
.. automodule:: cusignal.utils.arraytools
163163
:members:
164164
:undoc-members:
165165

166166
FFTPack Helper
167-
------------
167+
--------------
168168

169169
.. automodule:: cusignal.utils.fftpack_helper
170170
:members:
171171
:undoc-members:
172172

173173

174174
IO
175-
============
175+
==
176176

177177
Reader
178-
------------
178+
------
179179

180180
.. automodule:: cusignal.io.reader
181181
:members:
182182
:undoc-members:
183183

184184
Writer
185-
------------
185+
------
186186

187187
.. automodule:: cusignal.io.writer
188188
:members:
189189
:undoc-members:
190190

191191

192192
Radar/Phased Array
193-
============
193+
==================
194194

195195
Radar Tools
196-
------------
196+
-----------
197197

198198
.. automodule:: cusignal.radartools.radartools
199199
:members:

docs/source/conf.py

+1-25
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,4 @@
1-
#!/usr/bin/env python3
2-
# -*- coding: utf-8 -*-
3-
#
41
# Copyright (c) 2018-2022, NVIDIA CORPORATION.
5-
#
6-
# pygdf documentation build configuration file, created by
7-
# sphinx-quickstart on Wed May 3 10:59:22 2017.
8-
#
9-
# This file is execfile()d with the current directory set to its
10-
# containing dir.
11-
#
12-
# Note that not all possible configuration values are present in this
13-
# autogenerated file.
14-
#
15-
# All configuration values have a default; values that are commented out
16-
# serve to show the default.
17-
18-
# If extensions (or modules to document with autodoc) are in another directory,
19-
# add these directories to sys.path here. If the directory is relative to the
20-
# documentation root, use os.path.abspath to make it absolute, like shown here.
21-
#
22-
import os
23-
import sys
24-
sys.path.insert(0, os.path.abspath('../..'))
25-
262
# -- General configuration ------------------------------------------------
273

284
# If your documentation needs a minimal Sphinx version, state it here.
@@ -77,7 +53,7 @@
7753
#
7854
# This is also used if you do content translation via gettext catalogs.
7955
# Usually you set "language" from the command line for these cases.
80-
language = None
56+
language = 'en'
8157

8258
# List of patterns, relative to source directory, that match files and
8359
# directories to ignore when looking for source files.

python/cusignal/filtering/filtering.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1140,11 +1140,11 @@ def channelize_poly(x, h, n_chans):
11401140
Number of channels for channelizer
11411141
11421142
Returns
1143-
----------
1143+
-------
11441144
yy : channelized output matrix
11451145
11461146
Notes
1147-
----------
1147+
-----
11481148
Currently only supports simple channelizer where channel
11491149
spacing is equivalent to the number of channels used (zero overlap).
11501150
Number of filter taps (len of filter / n_chans) must be <=32.

0 commit comments

Comments
 (0)