WhoShouldICite.jl, idea for bibliography generation

I hope this is the right subforum.

I had a showerthought ™, how about a small package that collates all prior work you should cite? In addition to citation.bib, which I understand is to properly cite the author(s) of a package, it could be interesting to tag specific functions in a package – I have not derived every equation or algorithm I’ve implemented in a package, and the researchers beyond those could also deserve recognition, or it might just be interesting to see which research is behind all the computations you do.

I thought of something like this:

function spiffy_algorithm(args...)
    ...
end
@reference spiffy_algorithm Bethe1977 "Equation (63.2)" more optional arguments here ...

This could possibly also modify the docstring for you. Then, when your fantastic computation works, you could maybe run something like

@whoshouldIcite my_calculation()

which would trace all @reference-tagged functions and collect them in a tree structure, containing function name, package + author, reference (BibTeX code), and the optional extra remarks. Then it’s up to your conscience how deep or shallow your citations will be :stuck_out_tongue:

This is way beyond what I have time or knowledge for, but it was a neat idea, I thought.

6 Likes

I like that idea. It reminds me a bit of the way you can register references/citations within PETSc and retrieve them from the command line.

I implemented a very basic version of such an idea in one of my draft packages. There, I just define a function reference which returns a String containing a bibtex entry for given argument functions/algorithms. That’s not really perfect and your idea described above seems to be much more useful (but also involved).

Related discussions here on discourse:

grep?

1 Like

@ranocha Yes, the reference(::typeof(function_name)) was the first thing I thought of, but then more ideas kept popping up. I guess the tracing could be done with a Cassette-based algorithm.

@PetrKryslUCSD Sure, grep could do parts of what I thought about, but still a lot of postprocessing would be necessary, and it would not be able to find the packages/functions I need to cite for me; I would have to manually go to each package directory and grep there.