From 0f18cad86f98dcc7a1b62e94da8e4e0fbe589f8d Mon Sep 17 00:00:00 2001 From: NikoOinonen <42408893+NikoOinonen@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:44:50 +0300 Subject: [PATCH] Fix API docs (#305) The API docs were blank because the new dependencies from #275 were missing in the ReadTheDocs build. The badge on the front page was not showing the failure. This is because the failed imports are treated as warnings instead of errors. So I also added fail_on_warning: true to the config and fixed all of the remaining warnings so that there is at least some indication that the build is failing if this happens again in the future. --- .readthedocs.yaml | 1 + doc/sphinx/requirements.txt | 3 +++ ppafm/fieldFFT.py | 12 ++++++------ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index becdb4fa..e932b4f0 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -16,6 +16,7 @@ build: sphinx: configuration: doc/sphinx/source/conf.py + fail_on_warning: true python: install: diff --git a/doc/sphinx/requirements.txt b/doc/sphinx/requirements.txt index f4d6eb6e..4516a4c0 100644 --- a/doc/sphinx/requirements.txt +++ b/doc/sphinx/requirements.txt @@ -6,3 +6,6 @@ ase sphinx==7.2.6 furo==2023.9.10 myst-parser +pydantic +toml +PyQt5 diff --git a/ppafm/fieldFFT.py b/ppafm/fieldFFT.py index deff9b59..b49cb2d2 100644 --- a/ppafm/fieldFFT.py +++ b/ppafm/fieldFFT.py @@ -350,9 +350,9 @@ def potential2forces_mem(V, lvec, nDim, sigma=0.7, rho=None, multipole=None, doF def Average_surf(Val_surf, W_surf, W_tip): """ - Int_r Val_surf(r+R) W_tip(r) W_sample(r+R) W_tip) * (Val_surf W_sample) - (R) = ----------------------------------------- = -----------------------------; where * means convolution - Int_r W_tip(r) W_sample(r+R) W_tip * W_sample + | Int_r Val_surf(r+R) W_tip(r) W_sample(r+R) W_tip) * (Val_surf W_sample) + | (R) = ----------------------------------------- = -----------------------------; where * means convolution + | Int_r W_tip(r) W_sample(r+R) W_tip * W_sample """ if verbose > 0: print("Forward FFT ") @@ -384,9 +384,9 @@ def Average_surf(Val_surf, W_surf, W_tip): def Average_tip(Val_tip, W_surf, W_tip): """ - Int_r Val_tip(r) W_tip(r) W_sample(r+R) (Val_tip W_tip) * W_sample - (R) = ----------------------------------------- = -----------------------------; where * means convolution - Int_r W_surf(r) W_sample(r+R) W_tip * W_sample + | Int_r Val_tip(r) W_tip(r) W_sample(r+R) (Val_tip W_tip) * W_sample + | (R) = ----------------------------------------- = -----------------------------; where * means convolution + | Int_r W_surf(r) W_sample(r+R) W_tip * W_sample """ if verbose > 0: print("Forward FFT ")