Add generic function version()

Aperta
#28 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
r
Ambito
backend

Direzione di ricerca

Start by reading how BiocGenerics defines and exports existing S4 generic functions, then check the package's tests and documentation conventions. Add a version(object) generic following those conventions; done means it is exported and its generic signature is covered consistently with other generics. The issue does not name specific files or tests, so locate those entry points in the repository first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Requested by the spatialdataR folks.

After quickly going around the Bioconductor ecosystem, I found that several packages define the version() function, either as a regular function, or as an S4 generic function with methods:

BiocManager:

  • regular function with no argument

DaparToolshed:

  • generic with 1 method
  • generic's arguments: version(object, ...)
  • note that the method does not use the ellipsis

GenomicSuperSignature:

  • generic with 1 method
  • generic's arguments: version(x)

NanoStringNCTools:

  • generic with 1 method
  • generic's arguments: version(object, ...)
  • note that the method does not use the ellipsis

RedeR:

  • generic with 1 method
  • generic's arguments: version(obj)

Rigraphlib:

  • regular function with 1 argument
  • arguments: version(expected = FALSE)

msa:

  • generic with 1 method
  • generic's arguments: version(object)

I propose to use version(object) for the version() generic that we add to BiocGenerics. Better not to have the ellipsis in the argument list if it's not used. Problem with having the ellipsis in the generic and then define methods that ignore the ellipsis is that extra arguments mistakenly passed thru these methods are silently ignored instead of triggering an error.

So we can always add the ellipsis later when it's actually needed. Note that it's easy to do and doesn't break the existing methods.

Finally, as @Artur-man pointed out, conflicts with BiocManager::version() will be avoided by using the BiocManager:: prefix. Same thing with Rigraphlib::version().

Lingua principale
R
Stelle
13
Fork
8
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Bioconductor/BiocGenerics

Tutte le issue di Bioconductor/BiocGenerics

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.