Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: new documentation with mkdocs #527

Merged
merged 50 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
93fe46d
docs: delete sphinx
tlambert03 Nov 26, 2022
61391be
wip
tlambert03 Nov 27, 2022
5ab04e7
Merge branch 'main' into mkdocs
tlambert03 Nov 27, 2022
9db63a3
docs: wip
tlambert03 Nov 27, 2022
6497706
Merge branch 'main' into mkdocs
tlambert03 Nov 30, 2022
9165f8e
more changes
tlambert03 Dec 1, 2022
e89dab1
Merge branch 'main' into mkdocs
tlambert03 Dec 3, 2022
7677d95
writing markdown images
tlambert03 Dec 4, 2022
c1c52ab
Merge branch 'main' into mkdocs
tlambert03 Dec 11, 2022
4c67cdd
update widget overview
tlambert03 Dec 11, 2022
9fa8bee
wip
tlambert03 Dec 11, 2022
c4837e5
Merge branch 'main' into mkdocs
tlambert03 Dec 11, 2022
3620e45
docs: more progress
tlambert03 Dec 11, 2022
9ae9dbb
remove factory_doc
tlambert03 Dec 12, 2022
024e556
explicit magicgui kwargs
tlambert03 Dec 12, 2022
1bf7fcf
wip: more progress
tlambert03 Dec 12, 2022
f690f00
Merge branch 'main' into mkdocs
tlambert03 Dec 12, 2022
e27edc3
more changes
tlambert03 Dec 12, 2022
e2c23cd
fix: fix type
tlambert03 Dec 12, 2022
309c73b
Merge branch 'main' into mkdocs
tlambert03 Jan 25, 2023
fb4d250
docs: update widget previews
tlambert03 Jan 25, 2023
94fe6c6
some magicgui updates
tlambert03 Jan 25, 2023
507701f
docs: some more comments
tlambert03 Jan 25, 2023
59dcc30
docs updates
tlambert03 Feb 15, 2023
42b12c0
more docs
tlambert03 Feb 16, 2023
c8e15ca
more events docs
tlambert03 Feb 16, 2023
444fffb
docs: more updates
tlambert03 Feb 16, 2023
63d5d63
Merge branch 'main' into mkdocs
tlambert03 Feb 16, 2023
8116388
linting
tlambert03 Feb 16, 2023
75027dd
fix lint
tlambert03 Feb 16, 2023
288e65b
union
tlambert03 Feb 16, 2023
6cca659
fix setuppy
tlambert03 Feb 16, 2023
f05220f
fixes for py38
tlambert03 Feb 16, 2023
804e58e
fix cov
tlambert03 Feb 16, 2023
e94ecc1
fix pre commit
tlambert03 Feb 16, 2023
202928f
add back migration guide
tlambert03 Feb 16, 2023
0a16ab3
fix links in migration
tlambert03 Feb 16, 2023
d5a04b0
chore: Merge branch 'main' into mkdocs
tlambert03 Feb 23, 2023
0e5c6a3
docs: add codespell
tlambert03 Feb 23, 2023
780e5c2
docs: more examples
tlambert03 Feb 23, 2023
84a24d3
docs: more updates
tlambert03 Feb 23, 2023
34992bf
docs: move contributing guide
tlambert03 Feb 23, 2023
382ead2
mention msgspec
tlambert03 Feb 23, 2023
0c15c40
docs: add back napari demo
tlambert03 Feb 23, 2023
b626696
more examples return
tlambert03 Feb 24, 2023
43bcc91
add space
tlambert03 Feb 24, 2023
97695c0
docs: change docs action
tlambert03 Feb 24, 2023
09d2245
remove comment
tlambert03 Feb 24, 2023
62e3bcf
add comment
tlambert03 Feb 24, 2023
9d58412
link to widgets index
tlambert03 Feb 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 6 additions & 39 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,17 @@
name: deploy docs

on:
# Trigger the workflow on push to main branch
push:
branches:
- main
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

# This job installs dependencies, builds the book, and pushes it to `gh-pages`
jobs:
build-and-deploy-book:
runs-on: ubuntu-latest
deploy:
runs-on: macos-latest # for the screenshots
steps:
- uses: actions/checkout@v3

# Install dependencies
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Libraries
run: |
sudo apt-get install -y libdbus-1-3 libxkbcommon-x11-0 libxcb-icccm4 \
libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \
libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 xvfb
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid \
--make-pidfile --background --exec /usr/bin/Xvfb -- :99 \
-screen 0 1920x1200x24 -ac +extension GLX
- name: Install dependencies
run: |
pip install --upgrade pip
pip install .[pyqt5]
pip install -r docs/requirements.txt
python docs/patch.py

# Build the book
- name: Build the book
run: jupyter-book build docs
env:
DISPLAY: ":99.0"
XDG_RUNTIME_DIR: "/tmp/runtime-runner"

# Deploy the book's HTML to gh-pages branch
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3
- uses: actions/setup-python@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
python-version: '3.11'
- run: pip install -e .[docs]
- run: mkdocs gh-deploy --strict --force
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,4 @@ dmypy.json
.DS_Store
examples/_wip
.ruff_cache
docs/_images/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:


- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.245
rev: v0.0.247
hooks:
- id: ruff
args: ["--fix"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ and usage examples.

Contributions are welcome!

See contributing guide [here](https://github.com/pyapp-kit/magicgui/blob/main/CONTRIBUTING.md).
See contributing guide [here](https://github.com/pyapp-kit/magicgui/blob/main/docs/CONTRIBUTING.md).
17 changes: 17 additions & 0 deletions CONTRIBUTING.md → docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,20 @@ For more complex cases, you can add a new conditional to the body of the
`match_type` function. That function should always return a tuple of widget
type, and kwargs that will be passed to the widget constructor. For example:
`return widgets.MyNewWidget, {}`.

### Building the documentation

To build the documentation locally, you will need to install the `docs` extra:

```bash
pip install -e .[docs]
```

Then, from the root of the repository, run:

```bash
mkdocs serve
```

This will start a local server at `http://127.0.0.1:8000/` where you can view
the documentation as you edit it.
77 changes: 0 additions & 77 deletions docs/_config.yml

This file was deleted.

Loading