Add generic function version()

Aberta
#28 3 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
58/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
r
Domínio
backend

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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().

Linguagem predominante
R
Estrelas
13
Forks
8
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Bioconductor/BiocGenerics

Todas as issues de Bioconductor/BiocGenerics

Issues semelhantes

Mais issues de R

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.