Skip to content

Commit

Permalink
Merge pull request #361 from glotzerlab/reproducible-doc-builds
Browse files Browse the repository at this point in the history
Use a reproducible configuration to build docs.
  • Loading branch information
joaander committed Apr 30, 2024
2 parents 750bf33 + ce3ad02 commit 33ad870
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.12"

sphinx:
fail_on_warning: true
Expand Down
6 changes: 3 additions & 3 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
target-version = "py38"

extend-select = [
lint.extend-select = [
"A",
"B",
"D",
Expand All @@ -19,7 +19,7 @@ extend-select = [
"W",
]

ignore = [
lint.ignore = [
"N806", "N803", # Allow occasional use of uppercase variable and argument names (e.g. N).
"D107", # Do not document __init__ separately from the class.
"PLR09", # Allow "too many" statements/arguments/etc...
Expand All @@ -40,7 +40,7 @@ ignore = [
"D", # conf.py does not need documentation
]

[pydocstyle]
[lint.pydocstyle]
convention = "google"

[format]
Expand Down
8 changes: 8 additions & 0 deletions doc/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
breathe == 4.35.0
cython == 3.0.10
furo == 2024.1.29
ipython == 8.23.0
numpy == 1.26.4
pandas == 2.2.2
pyarrow == 16.0.0
sphinx == 7.3.7
126 changes: 118 additions & 8 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,118 @@
breathe == 4.35.0
cython == 3.0.10
furo == 2024.1.29
ipython == 8.23.0
numpy == 1.26.4
pandas == 2.2.1
pyarrow == 15.0.2
sphinx
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile requirements.in
#
alabaster==0.7.16
# via sphinx
asttokens==2.4.1
# via stack-data
babel==2.14.0
# via sphinx
beautifulsoup4==4.12.3
# via furo
breathe==4.35.0
# via -r requirements.in
certifi==2024.2.2
# via requests
charset-normalizer==3.3.2
# via requests
cython==3.0.10
# via -r requirements.in
decorator==5.1.1
# via ipython
docutils==0.21.2
# via
# breathe
# sphinx
executing==2.0.1
# via stack-data
furo==2024.1.29
# via -r requirements.in
idna==3.7
# via requests
imagesize==1.4.1
# via sphinx
ipython==8.23.0
# via -r requirements.in
jedi==0.19.1
# via ipython
jinja2==3.1.3
# via sphinx
markupsafe==2.1.5
# via jinja2
matplotlib-inline==0.1.7
# via ipython
numpy==1.26.4
# via
# -r requirements.in
# pandas
# pyarrow
packaging==24.0
# via sphinx
pandas==2.2.2
# via -r requirements.in
parso==0.8.4
# via jedi
pexpect==4.9.0
# via ipython
prompt-toolkit==3.0.43
# via ipython
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.2
# via stack-data
pyarrow==16.0.0
# via -r requirements.in
pygments==2.17.2
# via
# furo
# ipython
# sphinx
python-dateutil==2.9.0.post0
# via pandas
pytz==2024.1
# via pandas
requests==2.31.0
# via sphinx
six==1.16.0
# via
# asttokens
# python-dateutil
snowballstemmer==2.2.0
# via sphinx
soupsieve==2.5
# via beautifulsoup4
sphinx==7.3.7
# via
# -r requirements.in
# breathe
# furo
# sphinx-basic-ng
sphinx-basic-ng==1.0.0b2
# via furo
sphinxcontrib-applehelp==1.0.8
# via sphinx
sphinxcontrib-devhelp==1.0.6
# via sphinx
sphinxcontrib-htmlhelp==2.0.5
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.7
# via sphinx
sphinxcontrib-serializinghtml==1.1.10
# via sphinx
stack-data==0.6.3
# via ipython
traitlets==5.14.3
# via
# ipython
# matplotlib-inline
tzdata==2024.1
# via pandas
urllib3==2.2.1
# via requests
wcwidth==0.2.13
# via prompt-toolkit
5 changes: 2 additions & 3 deletions gsd/test/test_fl.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,8 @@ def test_dtype_errors(tmp_path, open_mode):

def test_truncate(tmp_path):
"""Test that the truncate method functions."""
data = numpy.ascontiguousarray(
numpy.random.random(size=(1000, 3)), dtype=numpy.float32
)
rng = numpy.random.default_rng()
data = numpy.ascontiguousarray(rng.random(size=(1000, 3)), dtype=numpy.float32)
with gsd.fl.open(
name=tmp_path / 'test_truncate.gsd',
mode='w',
Expand Down
5 changes: 3 additions & 2 deletions scripts/benchmark-hoomd.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ def run_benchmarks(N, size):
bmark_read_size = 0.25 * 1024**3

timings = {}
position = numpy.random.random((N, 3)).astype('float32')
orientation = numpy.random.random((N, 4)).astype('float32')
rng = numpy.random.default_rng()
position = rng.random((N, 3)).astype('float32')
orientation = rng.random((N, 4)).astype('float32')

nframes = compute_nframes(N, size)
actual_size = compute_actual_size(N, nframes)
Expand Down

0 comments on commit 33ad870

Please sign in to comment.