Repository: nilearn/nilearn

Issue:
Use bibtex in nilearn/connectome
Convert references in 

- `nilearn/connectome/connectivity_matrices.py`
- `nilearn/connectome/group_sparse_cov.py`

to use footcite / footbibliography.
See #2759 
Use bibtex in nilearn/connectome
Convert references in 

- `nilearn/connectome/connectivity_matrices.py`
- `nilearn/connectome/group_sparse_cov.py`

to use footcite / footbibliography.
See #2759 


Discussion:
Hey, I've just took care of one of the bibtex issues (#2786) and wouldn't mind doing a few more of the remaining ones (probably all of them, i.e. #2780, #2782, #2783 #2785, #2787, and #2788).

Is that okay or would you like to leave them open for future newbies?

Also, would you prefer having separate PRs for each of them or rather one large one? Thanks!
Hi @alexenge 
These issues are more meant to help newcomers do a first pull request without having to write code. This way you can just focus on the process of forking, cloning, pushing, submitting and so on. 
So, I think it'd be great if you could leave some of these issues to other newcomers. That being said, if you want to do another one, feel free to do so! 
Also, it's always better to do small PRs than large ones. It makes them much easier to review.
Btw, let me know if you want to be assigned to this one!
Thanks, I've thought so and this makes total sense.

It would be really cool if you could assign me this one so I can get just a bit more practice and then I would try to move on to something else.
Hey, I've just took care of one of the bibtex issues (#2786) and wouldn't mind doing a few more of the remaining ones (probably all of them, i.e. #2780, #2782, #2783 #2785, #2787, and #2788).

Is that okay or would you like to leave them open for future newbies?

Also, would you prefer having separate PRs for each of them or rather one large one? Thanks!
Hi @alexenge 
These issues are more meant to help newcomers do a first pull request without having to write code. This way you can just focus on the process of forking, cloning, pushing, submitting and so on. 
So, I think it'd be great if you could leave some of these issues to other newcomers. That being said, if you want to do another one, feel free to do so! 
Also, it's always better to do small PRs than large ones. It makes them much easier to review.
Btw, let me know if you want to be assigned to this one!
Thanks, I've thought so and this makes total sense.

It would be really cool if you could assign me this one so I can get just a bit more practice and then I would try to move on to something else.

Resolving patch:
diff --git a/nilearn/connectome/connectivity_matrices.py b/nilearn/connectome/connectivity_matrices.py
--- a/nilearn/connectome/connectivity_matrices.py
+++ b/nilearn/connectome/connectivity_matrices.py
@@ -107,12 +107,11 @@ def _geometric_mean(matrices, init=None, max_iter=10, tol=1e-7):
 
     In case of positive numbers, this mean is the usual geometric mean.
 
-    See Algorithm 3 of [1]_.
+    See Algorithm 3 of :footcite:`Fletcher2007`.
 
     References
     ----------
-    .. [1] P. Thomas Fletcher, Sarang Joshi. Riemannian Geometry for the
-       Statistical Analysis of Diffusion Tensor Data. Signal Processing, 2007.
+    .. footbibliography::
 
     Parameters
     ----------
@@ -406,7 +405,7 @@ class ConnectivityMeasure(BaseEstimator, TransformerMixin):
 
     kind : {"covariance", "correlation", "partial correlation",\
             "tangent", "precision"}, optional
-        The matrix kind. For the use of "tangent" see [1]_.
+        The matrix kind. For the use of "tangent" see :footcite:`Varoquaux2010b`.
         Default='covariance'.
 
     vectorize : bool, optional
@@ -435,8 +434,7 @@ class ConnectivityMeasure(BaseEstimator, TransformerMixin):
 
     References
     ----------
-    .. [1] G. Varoquaux et al. "Detection of brain functional-connectivity difference
-       in post-stroke patients using group-level covariance modeling, MICCAI 2010.
+    .. footbibliography::
 
     """
 
diff --git a/nilearn/connectome/group_sparse_cov.py b/nilearn/connectome/group_sparse_cov.py
--- a/nilearn/connectome/group_sparse_cov.py
+++ b/nilearn/connectome/group_sparse_cov.py
@@ -34,7 +34,7 @@ def compute_alpha_max(emp_covs, n_samples):
     matrices are fully dense (i.e. minimal number of zero coefficients).
 
     The formula used in this function was derived using the same method
-    as in [1]_.
+    as in :footcite:`Duchi2012`.
 
     Parameters
     ----------
@@ -55,11 +55,9 @@ def compute_alpha_max(emp_covs, n_samples):
         minimal value for the regularization parameter that gives a fully
         dense matrix.
 
-    Reference
+    References
     ---------
-    .. [1] Duchi, John, Stephen Gould, and Daphne Koller. 'Projected Subgradient
-       Methods for Learning Sparse Gaussians'. ArXiv E-prints 1206 (1 June
-       2012): 3249.
+    .. footbibliography::
 
     """
     A = np.copy(emp_covs)
@@ -145,7 +143,7 @@ def group_sparse_covariance(subjects, alpha, max_iter=50, tol=1e-3, verbose=0,
     Running time is linear on max_iter, and number of subjects (len(subjects)),
     but cubic on number of features (subjects[0].shape[1]).
 
-    The present algorithm is based on [1]_.
+    The present algorithm is based on :footcite:`Honorio2015`.
 
     Parameters
     ----------
@@ -205,9 +203,7 @@ def group_sparse_covariance(subjects, alpha, max_iter=50, tol=1e-3, verbose=0,
 
     References
     ----------
-    .. [1] Jean Honorio and Dimitris Samaras, "Simultaneous and Group-Sparse
-       Multi-Task Learning of Gaussian Graphical Models". arXiv:1207.4255
-       (17 July 2012). http://arxiv.org/abs/1207.4255.
+    .. footbibliography::
 
     """
 
@@ -456,8 +452,8 @@ def _group_sparse_covariance(emp_covs, n_samples, alpha, max_iter=10, tol=1e-3,
 class GroupSparseCovariance(BaseEstimator, CacheMixin):
     """Covariance and precision matrix estimator.
 
-    The model used has been introduced in [1]_, and the algorithm used is
-    based on what is described in [2]_.
+    The model used has been introduced in :footcite:`Varoquaux2010a`, and the
+    algorithm used is based on what is described in :footcite:`Honorio2015`.
 
     Parameters
     ----------
@@ -497,12 +493,7 @@ class GroupSparseCovariance(BaseEstimator, CacheMixin):
 
     References
     ----------
-    .. [1] Gael Varoquaux, et al. `Brain Covariance Selection: Better Individual
-       Functional Connectivity Models Using Population Prior
-       <http://arxiv.org/abs/1008.5071>`_'.
-
-    .. [2] Jean Honorio and Dimitris Samaras, "Simultaneous and Group-Sparse
-       Multi-Task Learning of Gaussian Graphical Models". http://arxiv.org/abs/1207.4255.
+    .. footbibliography::
 
     """
 


Test patch: