Adding fileStream information to documentation
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 48/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js
調査の方向性
stringifier と転送ストリームについて説明しているドキュメントを見つけ、issue の file-stream の例と比較してください。読者が fs.createWriteStream へのパイピング方法と fileStream.end() が必要かどうかを理解できるようにドキュメントを更新してください。file-stream のワークフローとストリームを閉じる際の動作が明確になれば完了です。
索引モデルが issue の本文から書いたものです。
説明
It might be helpful to include some documentation for people who are unfamiliar with transfer streams (like I was until I asked chatGPT). The docs mention that the stringifier writes to a transfer stream, but this is a subtle, and many people are likely to miss that detail or read through it because they don't know what it means.
Here is the code I wrote that can handle file streams:
import jsonlines from "jsonlines"
import fs from "fs"
import path from 'path'
export default function example () {
// I created a folder in my repo caled "files", and the stringifier will write to it (only locally, don't try this on something like Heroku)
const outputFilePath = path.join('files', 'jsonl-testing.jsonl')
const fileStream = fs.createWriteStream(outputFilePath)
const stringifier = jsonlines.stringify()
stringifier.pipe(fileStream)
stringifier.write({
"prompt": "Question: What is the meaning of life?\n\n###\n\n",
"completion": "Answer: 42.\n\nEND"
})
stringifier.write({
"prompt": "Question: What is not the meaning of life?\n\n###\n\n",
"completion": "Answer: not 42.\n\nEND"
})
stringifier.end()
fileStream.end() // do we need to do this? Docs do not specifiy
}
- 主要言語
- JavaScript
- スター
- 25
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
LinusU/node-jsonlines のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
LinusU/node-jsonlines#5 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
LinusU/node-jsonlines#4 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
LinusU/node-jsonlines#2 · コメント 1 件 ·
LinusU/node-jsonlines の issue をすべて見る
似ている issue
-
bot:ai-assisted component:compact-js status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
midnightntwrk/midnight-sdk#403 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
DavidAnson/markdownlint-cli2#940 ·
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100