Skip to content

Commit 1ff7d9a

Browse files
frey-perezpre-commit-ci[bot]Asanto32
authored
Feature/issue 218/sphinx (#238)
* new docs * api change * more api automation changes. * docs workflow * build from branch * link * rm pdocs * command change and duplicate code. * deploy from gh-pages * push to deploy * actions change * minimal actions, build on push * single commit * __doc__ link * tutorial change * homepage change. * git ignore. * reverting workflows to work off main. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * mistake. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * ruff lint ignore. * mypy exclude * linting * indentation * superfluous exclude patters. * linting * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * new_tutorial * remove old tutorial * removing old files, updating settings. * ignore notebooks * notebook change * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * poetry lock file update. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * removing type ignores, updating toml to ignore notebook. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update doc deps. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * lock file * References * supporterd formats * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update .github/workflows/docs.yaml Co-authored-by: Adam Santorelli <148909356+Asanto32@users.noreply.github.com> * workflow change * doc change, makefil edits. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * lock file update. * exclude notebooks from JSON hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Adam Santorelli <148909356+Asanto32@users.noreply.github.com>
1 parent 1951840 commit 1ff7d9a

47 files changed

Lines changed: 2684 additions & 545 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
docs/source/tutorial_data/three_nights.bin filter=lfs diff=lfs merge=lfs -text
2+
*.ipynb filter=lfs diff=lfs merge=lfs -text

.github/workflows/docs.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ on:
1313

1414
jobs:
1515
build-and-publish-docs:
16-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1716
runs-on: ubuntu-latest
1817
steps:
1918
- uses: actions/checkout@v4
@@ -26,10 +25,16 @@ jobs:
2625
run: |
2726
python -m pip install poetry
2827
poetry install --with docs
29-
- name: Build docs
28+
- name: Build Sphinx docs
29+
working-directory: docs
3030
run: |
31-
poetry run pdoc src/wristpy -o docs_build -t docs/pdoc-theme --docformat google
32-
touch docs_build/.nojekyll
33-
- uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8
31+
poetry run make html
32+
touch build/html/.nojekyll
33+
ls -la build/html | sed 's/^/BUILD: /'
34+
- name: Deploy to gh-pages
35+
uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8
3436
with:
35-
folder: docs_build
37+
branch: gh-pages
38+
folder: docs/build/html
39+
clean: true
40+
single-commit: true

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ instance/
7676

7777
# Sphinx documentation
7878
docs/_build/
79+
docs/build/
80+
7981

8082
# PyBuilder
8183
.pybuilder/

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@ repos:
4141
- --fix=lf
4242
- id: trailing-whitespace
4343
- id: pretty-format-json
44+
exclude: ^docs/source/.*\.ipynb$
4445
args:
4546
- --autofix
4647
- --indent=4
4748
- --no-sort-keys
4849
- id: check-merge-conflict
4950
- id: check-yaml
5051
- id: check-json
52+
exclude: ^docs/source/.*\.ipynb$
5153
- id: check-toml
5254

5355
- repo: local

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13883190.svg)](https://doi.org/10.5281/zenodo.13883190)
22

3-
# `wristpy` <img src="https://media.githubusercontent.com/media/childmindresearch/wristpy/main/docs/wristpy_logo.png" align="right" width="25%"/>
3+
# `wristpy` <img src="https://media.githubusercontent.com/media/childmindresearch/wristpy/main/docs/_static/images/wristpy_logo.png" align="right" width="25%"/>
44

55
A Python package for wrist-worn accelerometer data processing.
66

docs/Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
3+
4+
SPHINXOPTS ?=
5+
SPHINXBUILD ?= sphinx-build
6+
SOURCEDIR = source
7+
BUILDDIR = build
8+
9+
10+
help:
11+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
12+
13+
.PHONY: help Makefile
14+
15+
%: Makefile
16+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
17+
18+
19+
clean:
20+
@if [ -z "$(BUILDDIR)" ]; then \
21+
echo "Error: BUILDDIR is not set."; \
22+
exit 1; \
23+
fi
24+
rm -rf $(BUILDDIR)/*
25+
26+
livehtml:
27+
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/enmo_anglez_example3.png

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/enmo_example1.png

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/filtered_sleep_windows.png

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/light_example2.png

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)