Skip to content

Commit 50111fc

Browse files
committed
Merge branch 'dev' into pr/263
2 parents f9f7b90 + f262300 commit 50111fc

File tree

95 files changed

+3136
-1340
lines changed

Some content is hidden

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

95 files changed

+3136
-1340
lines changed

.github/workflows/multiversion-docs.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
name: multiversion-docs
44

55
on:
6-
pull_request:
7-
branches:
8-
- dev
96
workflow_dispatch:
107
push:
118
branches:
@@ -48,7 +45,7 @@ jobs:
4845
run: |
4946
cd ./dev/docsrc
5047
make clean
51-
make github
48+
make docs-sequential
5249
- name: Commit changes to docs
5350
run: |
5451
cd ./gh-pages-dev

.github/workflows/test-docs.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
name: test-docs
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- dev
8+
9+
jobs:
10+
build_docs:
11+
runs-on: ubuntu-latest
12+
env:
13+
KERAS_BACKEND: "jax"
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: 3.11
23+
cache: "pip"
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install .[docs]
28+
python -m pip install jax
29+
- name: Make docs from local state
30+
run: |
31+
cd ./docsrc
32+
make clean
33+
make local
34+
- name: Clean up
35+
run: |
36+
cd ./docsrc
37+
make clean-all

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ projects/
66
*/bayesflow.egg-info
77
docsrc/_build/
88
docsrc/_build_polyversion
9-
docsrc/.bf_doc_gen_venv
9+
docsrc/.docs_venvs
1010
docsrc/source/api
1111
docsrc/source/_examples
1212
docsrc/source/contributing.md
13+
examples/checkpoints/
1314
build
1415
docs/
1516

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
repos:
1515
- repo: https://github.com/astral-sh/ruff-pre-commit
1616
# Ruff version.
17-
rev: v0.9.6
17+
rev: v0.9.10
1818
hooks:
1919
# Run the linter.
2020
- id: ruff

CONTRIBUTING.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,23 +145,37 @@ pip install .[docs]
145145
```
146146

147147
The overall *structure* of the documentation is manually designed, but the API documentation is auto-generated.
148+
New top-level modules (i.e., `bayesflow.mynewmodule`) have to be manually added to the list in `docsrc/source/api/bayesflow.rst` to be included.
148149

149-
You can re-build the current documentation with
150+
You can re-build the for your local state with:
150151

151152
```bash
152153
cd docsrc
153-
make clean && make dev
154+
make clean && make local
154155
# in case of issues, try `make clean-all`
155156
```
156157

158+
Note that files ignored by git (i.e., listed in `.gitignore`) are not included in the documentation.
159+
157160
We also provide a multi-version documentation. To generate it, run
158161

159162
```bash
160163
cd docsrc
161-
make clean && make github
164+
make clean && make docs
162165
```
163166

167+
This will create and cache virtual environments for the build at `docsrc/.docs_venvs`.
168+
To remove them, run `make clean-all` in the `docsrc` directory.
169+
164170
The entry point of the rendered documentation will be at `docs/index.html`.
171+
To view the docs in the browser (which ensures correct redirects), run:
172+
173+
```bash
174+
cd docsrc
175+
make view-docs
176+
```
177+
178+
See `docsrc/README.md` for more details.
165179

166180
Note that undocumented changes will likely be rejected.
167181

assets/__init__.py

Whitespace-only changes.

assets/benchmark_network_architectures.py

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

bayesflow/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
datasets,
66
diagnostics,
77
distributions,
8+
experimental,
89
networks,
910
simulators,
1011
workflows,

0 commit comments

Comments
 (0)