diff --git a/.gitignore b/.gitignore index 4ffab5fb4..b346a410b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ __pycache__ docs/_build/ docs/src/generated/ docs/src/sg_execution_times.rst +# ignore file copied during doc build tools/documentation_developer/CONTRIBUTING.rst # file generated by hatch diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 76e877f91..6616b114c 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -21,7 +21,7 @@ For testing, we recommend you install the test dependencies with pip: .. code-block:: sh - pip install hidimstat[test] + pip install -e '.[test]' This will install ``pytest`` and the following extensions: ``pytest-cov``, ``pytest-randomly``, ``pytest-xdist``, ``pytest-html``, @@ -40,7 +40,7 @@ To run the examples, we recommend you install the example dependencies with pip: .. code-block:: sh - pip install hidimstat[example] + pip install -e '.[example]' For running the examples, it's necessary to install Matplotlib >= |MatplotlibMinVersion| and seaborn >= |SeabornMinVersion|. @@ -55,7 +55,7 @@ The documentation is built with Sphinx. We recommend you install the documentati .. code-block:: sh - pip install hidimstat[doc] + pip install -e '.[doc]' After this installation, you can build the documentation from the source using the Makefile in doc_conf: @@ -63,4 +63,4 @@ After this installation, you can build the documentation from the source using t make html -**For more information**, look at the `developer documentation `_ \ No newline at end of file +**For more information**, look at the `developer documentation `_ diff --git a/docs/src/index.rst b/docs/src/index.rst index 8a82a4df0..b314ae90d 100644 --- a/docs/src/index.rst +++ b/docs/src/index.rst @@ -172,8 +172,8 @@ For Knockoffs Inference: :target: https://github.com/psf/black -References ----------- +Bibliography +------------ .. bibliography:: ../tools/references.bib diff --git a/docs/tools/conf.py b/docs/tools/conf.py index 6475f3930..51623e771 100644 --- a/docs/tools/conf.py +++ b/docs/tools/conf.py @@ -96,7 +96,7 @@ # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: -source_suffix = [".rst", ".md"] +source_suffix = {".rst": "restructuredtext"} # sphinxcontrib-bibtex bibtex_bibfiles = ["../tools/references.bib"] diff --git a/examples/plot_2D_simulation_example.py b/examples/plot_2D_simulation_example.py index 82b888146..20e30cb5f 100644 --- a/examples/plot_2D_simulation_example.py +++ b/examples/plot_2D_simulation_example.py @@ -41,10 +41,6 @@ significantly the spatial uncertainty compared to clustered inference algorithms which consider only one spatial compression. -References ----------- -.. footbibliography:: - """ import matplotlib.pyplot as plt @@ -356,3 +352,9 @@ def plot(maps, titles): # conservative. In practice, Type-1 Error guarantees seem to hold # for a lower spatial tolerance. This is an additional benefit of clustering # randomization. + +############################################################################# +# References +# ---------- +# .. footbibliography:: +# diff --git a/examples/plot_diabetes_variable_importance_example.py b/examples/plot_diabetes_variable_importance_example.py index 0340d9a3d..fd8bd3a3a 100644 --- a/examples/plot_diabetes_variable_importance_example.py +++ b/examples/plot_diabetes_variable_importance_example.py @@ -36,10 +36,6 @@ single-level case. The aim is to see if integrating the new statistically-controlled solution has an impact on the results. -References ----------- -.. footbibliography:: - """ ############################################################################# @@ -255,3 +251,10 @@ def compute_pval(vim): ax.set_xticks(range(len(diabetes.feature_names))) ax.set_xticklabels(diabetes.feature_names) plt.show() + + +############################################################################# +# References +# ---------- +# .. footbibliography:: +# diff --git a/src/hidimstat/distilled_conditional_randomization_test.py b/src/hidimstat/distilled_conditional_randomization_test.py index cd76ed971..1ce24ef0d 100644 --- a/src/hidimstat/distilled_conditional_randomization_test.py +++ b/src/hidimstat/distilled_conditional_randomization_test.py @@ -403,7 +403,7 @@ def fit_importance(self, X, y, cv=None): Notes ----- - Also sets the importances\_ and pvalues\_ attributes on the instance. + Also sets the ``importances_`` and ``pvalues_`` attributes on the instance. See fit() and importance() for details on the underlying computations. """ if cv is not None: