diff --git a/.vscode/settings.json b/.vscode/settings.json index 6581b8fb..dec80666 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -53,6 +53,7 @@ } ], "livePreview.defaultPreviewPath": "docs/_build/html", + "multiDiffEditor.experimental.enabled": true, "mypy-type-checker.args": ["--config-file=${workspaceFolder}/pyproject.toml"], "mypy-type-checker.importStrategy": "fromEnvironment", "notebook.gotoSymbols.showAllSymbols": true, diff --git a/pyproject.toml b/pyproject.toml index dc16fc80..a7292b58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -115,6 +115,8 @@ mypy = [ "tensorwaves[test-types]", "types-PyYAML", "types-requests", + "types-tensorflow", + "types-tqdm", ] numba = [ "numba", @@ -230,10 +232,6 @@ module = ["benchmarks.*", "tests.*"] ignore_errors = true module = ["typings.*"] -[[tool.mypy.overrides]] -ignore_missing_imports = true -module = ["IPython.*"] - [[tool.mypy.overrides]] ignore_missing_imports = true module = ["iminuit.*"] @@ -244,27 +242,15 @@ module = ["numba.*"] [[tool.mypy.overrides]] ignore_missing_imports = true -module = ["numpy.*"] - -[[tool.mypy.overrides]] -ignore_missing_imports = true -module = ["phasespace.*"] - -[[tool.mypy.overrides]] -ignore_missing_imports = true -module = ["scipy.*"] - -[[tool.mypy.overrides]] -ignore_missing_imports = true -module = ["sphinx.*"] +module = ["phasespace"] [[tool.mypy.overrides]] ignore_missing_imports = true -module = ["tensorflow.*"] +module = ["scipy.optimize"] [[tool.mypy.overrides]] ignore_missing_imports = true -module = ["tqdm.*"] +module = ["tensorflow.python.ops.numpy_ops"] [tool.pyright] exclude = [ diff --git a/tox.ini b/tox.ini index 1076cce6..355ba30d 100644 --- a/tox.ini +++ b/tox.ini @@ -106,6 +106,38 @@ setenv = EXECUTE_NB = yes FORCE_COLOR = yes +[testenv:docnblive] +allowlist_externals = + sphinx-autobuild +commands = + sphinx-autobuild \ + --open-browser \ + --re-ignore .*/.ipynb_checkpoints/.* \ + --re-ignore .*/__pycache__/.* \ + --re-ignore docs/.*\.csv \ + --re-ignore docs/.*\.gif \ + --re-ignore docs/.*\.gv \ + --re-ignore docs/.*\.inv \ + --re-ignore docs/.*\.json \ + --re-ignore docs/.*\.pickle \ + --re-ignore docs/.*\.png \ + --re-ignore docs/.*\.svg \ + --re-ignore docs/.*\.yaml \ + --re-ignore docs/.*\.yml \ + --re-ignore docs/_build/.* \ + --re-ignore docs/api/.* \ + --re-ignore docs/usage/logs/.* \ + --re-ignore docs/usage/sub_expr_f? \ + --watch docs \ + --watch src \ + docs/ docs/_build/html +description = + Set up a server to directly preview changes to the HTML pages +passenv = * +setenv = + EXECUTE_NB = yes + FORCE_COLOR = yes + [testenv:jax] allowlist_externals = pytest diff --git a/typings/README.md b/typings/README.md index adaf1971..472914d6 100644 --- a/typings/README.md +++ b/typings/README.md @@ -6,12 +6,12 @@ external libraries. You can do this using [`stubgen`](https://mypy.readthedocs.io/en/stable/stubgen.html). For instance: ```shell -stubgen -p tensorflow -o typings +stubgen -p sympy -o typings ``` Alternatively, use [Pyright](https://github.com/microsoft/pyright) to generate stub files that contain docstrings as well: ```shell -pyright --createstub tensorflow +pyright --createstub sympy ```