[Feature Request]: Improve reporting of qenv code

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

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

評価

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

調査の方向性

Read the issue's example using globals::globalsOf and the warning produced for subset(iris, Species == species). Start by identifying how qenv code is evaluated and how its environment is isolated; the issue names no files or tests, so locate those entry points in the repository. Done means missing variables or external dependencies are reported more accurately without gaining access to objects from unloaded packages through .GlobalEnv.

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

説明

enhancement
Feature description

During #303 for #272 it was suggested to use globals package for finding issues with the code supplied.

Using code like this:

g2 <- globals::globalsOf(parsed_code, method = "conservative", mustExist = FALSE, envir = [email protected])
    missing <- globals::cleanup(g2, drop = c("nativesymbolinfo", "base-packages"))
    if (length(missing)) {
      warn <- warningCondition(
        message = sprintf(
          "When evaluating qenv code:\n%s\nMissing objects %s",
          parsed_code,
          toString(sQuote(names(missing), "'"))
        ),
        class = c("qenv.warn", "simpleWarning")
      )
      warning(warn, call. = FALSE)
    }

Lead to warnings like this on tests:

When evaluating qenv code:
i <- subset(iris, Species == species)
Missing objects 'Species', 'species'

There wasn't an optimal method that would find those variables that cannot be created. It would be great if there were a better way to find the missing variables or external dependencies than to evaluate the code with the .GlobalEnv as this provides access to objects from packages that are not loaded inside the qenv.

Code of Conduct
  • I agree to follow this project's Code of Conduct.
Contribution Guidelines
  • I agree to follow this project's Contribution Guidelines.
Security Policy
  • I agree to follow this project's Security Policy.
主要言語
R
スター
12
フォーク
12
平均マージ
4日 22時間
マージ済み PR(30日)
3

環境構築

はじめの一歩

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

pharmaverse/teal.code のほかの issue

pharmaverse/teal.code の issue をすべて見る

似ている issue

R の issue をもっと見る

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

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