Add generic function version()

オープン
#28 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
58/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
r
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
R
スター
13
フォーク
8
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Bioconductor/BiocGenerics のほかの issue

Bioconductor/BiocGenerics の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。