Skip to content

Commit 55e0cce

Browse files
authored
phase out pdoc3 in favour of pdoc (#1377)
1 parent 118f471 commit 55e0cce

File tree

4 files changed

+47
-46
lines changed

4 files changed

+47
-46
lines changed

.github/workflows/pdoc_index_workaround.py

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

.github/workflows/tests+artifacts+pypi.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,10 @@ jobs:
6969
with:
7070
python-version: 3.9
7171
- run: |
72-
pip install pdoc3
72+
pip install pdoc
7373
pip install -e .
7474
pip install -e examples
75-
python -We -m pdoc --html PySDM examples/PySDM_examples
76-
python -We .github/workflows/pdoc_index_workaround.py
75+
PDOC_ALLOW_EXEC=1 python -We -m pdoc -o html PySDM examples/PySDM_examples -t pdoc_templates
7776
- if: ${{ github.ref == 'refs/heads/main' && matrix.platform == 'ubuntu-latest' }}
7877
uses: JamesIves/[email protected]
7978
with:

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
[![Appveyor Build status](http://ci.appveyor.com/api/projects/status/github/open-atmos/PySDM?branch=main&svg=true)](https://ci.appveyor.com/project/slayoo/pysdm/branch/main)
2222
[![Coverage Status](https://codecov.io/gh/open-atmos/PySDM/branch/main/graph/badge.svg)](https://app.codecov.io/gh/open-atmos/PySDM)
2323
[![PyPI version](https://badge.fury.io/py/PySDM.svg)](https://pypi.org/project/PySDM)
24-
[![API docs](https://img.shields.io/badge/API_docs-pdoc3-blue.svg)](https://open-atmos.github.io/PySDM/)
24+
[![API docs](https://shields.mitmproxy.org/badge/docs-pdoc.dev-brightgreen.svg)](https://open-atmos.github.io/PySDM/)
2525

2626
PySDM is a package for simulating the dynamics of population of particles.
2727
It is intended to serve as a building block for simulation systems modelling
@@ -51,9 +51,9 @@ Like the examples, these tutorials can be executed or viewed "in the cloud" maki
5151
PySDM has two alternative parallel number-crunching backends
5252
available: multi-threaded CPU backend based on [Numba](http://numba.pydata.org/)
5353
and GPU-resident backend built on top of [ThrustRTC](https://pypi.org/project/ThrustRTC/).
54-
The [`Numba`](https://open-atmos.github.io/PySDM/PySDM/backends/numba/numba.html) backend (aliased ``CPU``) features multi-threaded parallelism for
54+
The [`Numba`](https://open-atmos.github.io/PySDM/PySDM/backends/numba.html) backend (aliased ``CPU``) features multi-threaded parallelism for
5555
multi-core CPUs, it uses the just-in-time compilation technique based on the LLVM infrastructure.
56-
The [`ThrustRTC`](https://open-atmos.github.io/PySDM/PySDM/backends/thrustRTC/thrustRTC.html) backend (aliased ``GPU``) offers GPU-resident operation of PySDM
56+
The [`ThrustRTC`](https://open-atmos.github.io/PySDM/PySDM/backends/thrust_rtc.html) backend (aliased ``GPU``) offers GPU-resident operation of PySDM
5757
leveraging the [SIMT](https://en.wikipedia.org/wiki/Single_instruction,_multiple_threads)
5858
parallelisation model.
5959
Using the ``GPU`` backend requires nVidia hardware and [CUDA driver](https://developer.nvidia.com/cuda-downloads).
@@ -65,7 +65,7 @@ For an overview of PySDM features (and the preferred way to cite PySDM in papers
6565
PySDM includes an extension of the SDM scheme to represent collisional breakup described in [de Jong, Mackay et al. 2023](10.5194/gmd-16-4193-2023).
6666
For a list of talks and other materials on PySDM as well as a list of published papers featuring PySDM simulations, see the [project wiki](https://github.com/open-atmos/PySDM/wiki).
6767

68-
A [pdoc-generated](https://pdoc3.github.io/pdoc) documentation of PySDM public API is maintained at: [https://open-atmos.github.io/PySDM](https://open-atmos.github.io/PySDM)
68+
A [pdoc-generated](https://pdoc.dev/) documentation of PySDM public API is maintained at: [https://open-atmos.github.io/PySDM](https://open-atmos.github.io/PySDM)
6969

7070
## Example Jupyter notebooks (reproducing results from literature):
7171

@@ -175,8 +175,8 @@ In order to depict the PySDM API with a practical example, the following
175175
listings provide sample code roughly reproducing the
176176
Figure 2 from [Shima et al. 2009 paper](http://doi.org/10.1002/qj.441)
177177
using PySDM from Python, Julia and Matlab.
178-
It is a [`Coalescence`](https://open-atmos.github.io/PySDM/PySDM/dynamics/coalescence.html)-only set-up in which the initial particle size
179-
spectrum is [`Exponential`](https://open-atmos.github.io/PySDM/PySDM/initialisation/spectra.html#PySDM.initialisation.spectra.Exponential) and is deterministically sampled to match
178+
It is a [`Coalescence`](https://open-atmos.github.io/PySDM/PySDM/dynamics/collisions/sollision.html#Coalescence)-only set-up in which the initial particle size
179+
spectrum is [`Exponential`](https://open-atmos.github.io/PySDM/PySDM/initialisation/spectra/exponential.html#Exponential) and is deterministically sampled to match
180180
the condition of each super-droplet having equal initial multiplicity:
181181
<details>
182182
<summary>Julia (click to expand)</summary>
@@ -230,9 +230,9 @@ attributes['volume'], attributes['multiplicity'] = ConstantMultiplicity(initial_
230230
```
231231
</details>
232232

233-
The key element of the PySDM interface is the [``Particulator``](https://open-atmos.github.io/PySDM/PySDM/particulator.html)
233+
The key element of the PySDM interface is the [``Particulator``](https://open-atmos.github.io/PySDM/PySDM/particulator.html#Particulator)
234234
class instances of which are used to manage the system state and control the simulation.
235-
Instantiation of the [``Particulator``](https://open-atmos.github.io/PySDM/PySDM/particulator.html) class is handled by the [``Builder``](https://open-atmos.github.io/PySDM/PySDM/builder.html)
235+
Instantiation of the [``Particulator``](https://open-atmos.github.io/PySDM/PySDM/particulator.html#Particulator) class is handled by the [``Builder``](https://open-atmos.github.io/PySDM/PySDM/builder.html#Builder)
236236
as exemplified below:
237237
<details>
238238
<summary>Julia (click to expand)</summary>
@@ -302,18 +302,18 @@ particulator = builder.build(attributes, products)
302302
The ``backend`` argument may be set to ``CPU`` or ``GPU``
303303
what translates to choosing the multi-threaded backend or the
304304
GPU-resident computation mode, respectively.
305-
The employed [`Box`](https://open-atmos.github.io/PySDM/PySDM/environments/box.html) environment corresponds to a zero-dimensional framework
305+
The employed [`Box`](https://open-atmos.github.io/PySDM/PySDM/environments/box.html#Box) environment corresponds to a zero-dimensional framework
306306
(particle positions are not considered).
307307
The vectors of particle multiplicities ``n`` and particle volumes ``v`` are
308308
used to initialise super-droplet attributes.
309-
The [`Coalescence`](https://open-atmos.github.io/PySDM/PySDM/dynamics/coalescence.html)
309+
The [`Coalescence`](https://open-atmos.github.io/PySDM/PySDM/dynamics/collisions/collision.html#Coalescence)
310310
Monte-Carlo algorithm (Super Droplet Method) is registered as the only
311311
dynamic in the system.
312-
Finally, the [`build()`](https://open-atmos.github.io/PySDM/PySDM/builder.html#PySDM.builder.Builder.build) method is used to obtain an instance
313-
of [`Particulator`](https://open-atmos.github.io/PySDM/PySDM/particulator.html#PySDM.particulator.Particulator) which can then be used to control time-stepping and
312+
Finally, the [`build()`](https://open-atmos.github.io/PySDM/PySDM/builder.html#Builder.build) method is used to obtain an instance
313+
of [`Particulator`](https://open-atmos.github.io/PySDM/PySDM/particulator.html#Particulator) which can then be used to control time-stepping and
314314
access simulation state.
315315

316-
The [`run(nt)`](https://open-atmos.github.io/PySDM/PySDM/particulator.html#PySDM.particuparticulatorr.Particulator.run) method advances the simulation by ``nt`` timesteps.
316+
The [`run(nt)`](https://open-atmos.github.io/PySDM/PySDM/particulator.html#Particulator.run) method advances the simulation by ``nt`` timesteps.
317317
In the listing below, its usage is interleaved with plotting logic
318318
which displays a histogram of particle mass distribution
319319
at selected timesteps:
@@ -430,16 +430,16 @@ The component submodules used to create this simulation are visualized below:
430430
SPECTRUM_INIT["ParticleVolumeVersusRadiusLogarithmSpectrum.__init__()"] -->|instantiates| SPECTRUM
431431
SPECTRUM[":ParticleVolumeVersusRadiusLogarithmSpectrum"] -->|added as element of| PRODUCTS
432432
433-
click COAL "https://open-atmos.github.io/PySDM/PySDM/dynamics/collisions/collision.html"
433+
click COAL "https://open-atmos.github.io/PySDM/PySDM/dynamics/collisions/collision.html#Coalescence"
434434
click BUILDER_INSTANCE "https://open-atmos.github.io/PySDM/PySDM/builder.html"
435435
click BUILDER_INIT "https://open-atmos.github.io/PySDM/PySDM/builder.html"
436436
click BUILDER_ADD_DYN "https://open-atmos.github.io/PySDM/PySDM/builder.html"
437-
click ENV_INIT "https://open-atmos.github.io/PySDM/PySDM/environments/index.html"
438-
click ENV "https://open-atmos.github.io/PySDM/PySDM/environments/index.html"
439-
click KERNEL_INIT "https://open-atmos.github.io/PySDM/PySDM/dynamics/collisions/collision_kernels/index.html"
440-
click KERNEL "https://open-atmos.github.io/PySDM/PySDM/dynamics/collisions/collision_kernels/index.html"
441-
click EXP_INIT "https://open-atmos.github.io/PySDM/PySDM/initialisation/spectra/index.html"
442-
click IS "https://open-atmos.github.io/PySDM/PySDM/initialisation/spectra/index.html"
437+
click ENV_INIT "https://open-atmos.github.io/PySDM/PySDM/environments.html"
438+
click ENV "https://open-atmos.github.io/PySDM/PySDM/environments.html"
439+
click KERNEL_INIT "https://open-atmos.github.io/PySDM/PySDM/dynamics/collisions/collision_kernels.html"
440+
click KERNEL "https://open-atmos.github.io/PySDM/PySDM/dynamics/collisions/collision_kernels.html"
441+
click EXP_INIT "https://open-atmos.github.io/PySDM/PySDM/initialisation/spectra.html"
442+
click IS "https://open-atmos.github.io/PySDM/PySDM/initialisation/spectra.html"
443443
click CM_INIT "https://open-atmos.github.io/PySDM/PySDM/initialisation/sampling/spectral_sampling.html"
444444
click CM_INSTANCE "https://open-atmos.github.io/PySDM/PySDM/initialisation/sampling/spectral_sampling.html"
445445
click SAMPLE "https://open-atmos.github.io/PySDM/PySDM/initialisation/sampling/spectral_sampling.html"
@@ -455,7 +455,7 @@ The component submodules used to create this simulation are visualized below:
455455

456456
In the following example, a condensation-only setup is used with the adiabatic
457457
[`Parcel`](https://open-atmos.github.io/PySDM/PySDM/environments/parcel.html) environment.
458-
An initial [`Lognormal`](https://open-atmos.github.io/PySDM/PySDM/initialisation/spectra.html#PySDM.initialisation.spectra.Lognormal)
458+
An initial [`Lognormal`](https://open-atmos.github.io/PySDM/PySDM/initialisation/spectra/lognormal.html#Lognormal)
459459
spectrum of dry aerosol particles is first initialised to equilibrium wet size for the given
460460
initial humidity.
461461
Subsequent particle growth due to [`Condensation`](https://open-atmos.github.io/PySDM/PySDM/dynamics/condensation.html) of water vapour (coupled with the release of latent heat)
@@ -465,7 +465,7 @@ Results of the simulation are plotted against vertical
465465
and depict the evolution of
466466
[`PeakSupersaturation`](https://open-atmos.github.io/PySDM/PySDM/products/condensation/peak_supersaturation.html),
467467
[`EffectiveRadius`](https://open-atmos.github.io/PySDM/PySDM/products/size_spectral/effective_radius.html),
468-
[`ParticleConcentration`](https://open-atmos.github.io/PySDM/PySDM/products/size_spectral/particle_concentration.html#PySDM.products.particles_concentration.ParticleConcentration)
468+
[`ParticleConcentration`](https://open-atmos.github.io/PySDM/PySDM/products/size_spectral/particle_concentration.html#ParticleConcentration)
469469
and the
470470
[`WaterMixingRatio `](https://open-atmos.github.io/PySDM/PySDM/products/size_spectral/water_mixing_ratio.html).
471471

pdoc_templates/index.html.jinja2

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{% extends "default/index.html.jinja2" %}
2+
3+
{% block title %}PySDM module list{% endblock %}
4+
5+
{% block nav %}
6+
<h2>Available Modules</h2>
7+
<ul>
8+
{% for submodule in all_modules if "." not in submodule %}
9+
<li><a href="{{ submodule.replace(".","/") }}.html">{{ submodule }}</a></li>
10+
{% endfor %}
11+
</ul>
12+
{% endblock %}
13+
14+
{% block content %}
15+
<main class="pdoc">
16+
17+
{% filter to_html %}
18+
# PySDM documentation home page
19+
{% endfilter %}
20+
21+
</main>
22+
{% include "search.html.jinja2" %}
23+
{% endblock %}

0 commit comments

Comments
 (0)