Skip to content

[Bioc-devel] importing (and therefore requiring) one function, vs copying function

2 messages · Robert M. Flight, James W. MacDonald

#
Hi Everyone,

I'm creating my own package, and one use case utilizes gene ontology
graphs generated based on a user defined set of GO terms. There is a
function in GOstats, GOGraph that does this, but that would be the
only function I actually use from GOstats. Instead of putting an
import for the one function (and therefore adding to the dependency),
I thought about instead just putting a copy of the function in my own
package with a note as to the original source.

My question is which would be the best practice?

Regards,

-Robert

Robert M. Flight, Ph.D.
University of Louisville Bioinformatics Laboratory
University of Louisville
Louisville, KY

PH 502-852-1809 (HSC)
PH 502-852-0467 (Belknap)
EM robert.flight at louisville.edu
EM rflight79 at gmail.com
robertmflight.blogspot.com
bioinformatics.louisville.edu/lab

The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..." -
Isaac Asimov
#
Hi Robert,
On 1/30/2012 3:31 PM, Robert M. Flight wrote:
Putting a copy in your package is much less desirable than importing the 
one function. Yes, people will have to download one more package, but 
GOstats is small and most people aren't that bandwidth-constrained these 
days.

If you put a copy in your package, you will then be responsible for 
ensuring that it is kept in sync with the GOstats version. This might 
not ever be a problem, but then again it might. Importing keeps that 
mess out of your hair.

Best,

Jim