Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add duecredit #13

Open
rmarkello opened this issue Feb 20, 2018 · 0 comments
Open

Add duecredit #13

rmarkello opened this issue Feb 20, 2018 · 0 comments
Labels
documentation Documentation is missing, unclear, or incorrect

Comments

@rmarkello
Copy link
Member

rmarkello commented Feb 20, 2018

A lot of the code in this repository builds on a significant amount of previous work and publications. Currently, references to those works are located in the doc-strings of relevant functions/classes (under the References heading). However, we could instead integrate duecredit, a tool that helps users know to whom and how to assign credit when using code.

Thankfully, the duecredit page has a brief walk-through for integration. It would be great to integrate it into pyls and convert all the references currently located in doc-strings into duecredit-style citations.

As an example, pyls.types.BehavioralPLS currently has the following reference in its doc-string:

class BehavioralPLS(BasePLS):
    """
    Runs "behavioral" PLS

    Parameters
    ----------
    ...
    
    References
    ----------
    .. [1] McIntosh, A. R., Bookstein, F. L., Haxby, J. V., & Grady, C. L.
       (1996). Spatial pattern analysis of functional brain images using
       partial least squares. Neuroimage, 3(3), 143-157.
    """

This could be converted to a duecredit-style citation:

@due.dcite(BibTeX("""
    @article{mcintosh1996spatial,
    author={McIntosh, AR and Bookstein, FL and Haxby, James V and Grady, CL},
    title={Spatial pattern analysis of functional brain images using partial least squares},
    year={1996},
    journal={NeuroImage},
    volume={3},
    number={3},
    pages={143--157}}
    """),
    description='First application of PLS to functional neuroimaging data.')
class BehavioralPLS(BasePLS):
    """
    Runs "behavioral" PLS

    Parameters
    ----------
    ...
    """

Then, users would be able to follow the instructions for running their code with duecredit enabled to get a functioning BibTeX file!

It would be best to follow the steps in the duecredit guide for copying over the stub.py to the primary directory of pyls and then importing (from .due import due, Doi, BibTeX) as required. The rest would be filling out the BibTeX-style decorators, like in the example above.

@rmarkello rmarkello added help wanted Extra attention is needed good first issue Good for newcomers! labels Apr 4, 2018
@rmarkello rmarkello added documentation Documentation is missing, unclear, or incorrect and removed good first issue Good for newcomers! help wanted Extra attention is needed labels Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation is missing, unclear, or incorrect
Projects
None yet
Development

No branches or pull requests

1 participant