Skip to content

Commit ca9a28f

Browse files
authored
contributing docs and workflow improvements (#144)
1 parent 7049c78 commit ca9a28f

File tree

3 files changed

+40
-4
lines changed

3 files changed

+40
-4
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Updating the example data
2+
3+
Metadata for ArviZ's example datasets (which are loadable by {func}`~arviz_base.load_arviz_data`) is stored in the [`arviz_example_data`](https://github.com/arviz-devs/arviz_example_data) repository.
4+
This repo has been embedded into the `arviz` repo at `/src/arviz_base/example_data` using [git subtree](https://www.atlassian.com/git/tutorials/git-subtree) with the following command:
5+
6+
```bash
7+
$ git subtree add --prefix src/arviz_base/example_data https://github.com/arviz-devs/arviz_example_data.git main --squash
8+
```
9+
10+
When `arviz_example_data` is updated, the subtree within the `arviz` repo also needs to be updated with the following command:
11+
12+
```bash
13+
$ git subtree pull --prefix src/arviz_base/example_data https://github.com/arviz-devs/arviz_example_data.git main --squash
14+
```
15+
16+
Moreover, to keep the size of the wheel and sdist for `arviz-base` as small as possible, the `code` folder of `arviz_example_data` is also removed as it contains some jupyter notebooks and csv files.

docs/source/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ ArviZ in Context <https://arviz-devs.github.io/EABM/>
7878
api/index
7979
:::
8080

81+
:::{toctree}
82+
:caption: Contributing
83+
:hidden:
84+
85+
contributing/updating_example_data
86+
:::
87+
8188
:::{toctree}
8289
:caption: About
8390
:hidden:

tox.ini

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ envlist =
77
# See https://tox.readthedocs.io/en/latest/example/package.html#flit
88
isolated_build = True
99
isolated_build_env = build
10+
labels =
11+
dev = check, cleandocs, docs, livedocs, viewdocs, py311, py312, py313, nightlies
1012

1113
[gh-actions]
1214
python =
@@ -15,6 +17,7 @@ python =
1517
3.13: py313-coverage
1618

1719
[testenv]
20+
description = Run ArviZ-base tests
1821
basepython =
1922
py311: python3.11
2023
py312: python3.12
@@ -35,13 +38,14 @@ commands =
3538
pytest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {posargs:-vv}
3639

3740
[testenv:nightlies]
41+
description = Run test job with nightly pre-releases of scientific python packages
3842
install_command = python -I -m pip install --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple {opts} {packages}
3943
pip_pre = true
4044
setenv =
4145
NIGHTLIES=TRUE
4246

4347
[testenv:check]
44-
description = perform style checks
48+
description = Perform style checks
4549
extras =
4650
check
4751
allowlist_externals =
@@ -52,7 +56,7 @@ commands =
5256
python -m build
5357

5458
[testenv:docs]
55-
description = build HTML docs
59+
description = Build HTML docs
5660
setenv =
5761
READTHEDOCS_PROJECT = arviz_base
5862
READTHEDOCS_VERSION = latest
@@ -61,15 +65,24 @@ extras =
6165
commands =
6266
sphinx-build -d "{toxworkdir}/docs_doctree" docs/source "{toxworkdir}/docs_out" --color -v -bhtml
6367

68+
[testenv:livedocs]
69+
description = Build live preview of HTML docs with automatic updates
70+
base = docs
71+
extras =
72+
doc
73+
sphinx-autobuild
74+
commands =
75+
sphinx-autobuild -d "{toxworkdir}/docs_doctree" docs/source "{toxworkdir}/docs_out" --color -v -bhtml
76+
6477
[testenv:cleandocs]
65-
description = clean HTML outputs docs
78+
description = Clean HTML doc build outputs
6679
skip_install = true
6780
allowlist_externals = rm
6881
commands =
6982
rm -r "{toxworkdir}/docs_out" "{toxworkdir}/docs_doctree" "{toxworkdir}/jupyter_execute" docs/source/api/generated docs/source/contributing/generated
7083

7184
[testenv:viewdocs]
72-
description = open HTML docs
85+
description = View HTML docs with the default browser
7386
skip_install = true
7487
commands =
7588
python -m webbrowser "{toxworkdir}/docs_out/index.html"

0 commit comments

Comments
 (0)