Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Programmatically update Docstring

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
ai

調査の方向性

まず、@bundle 関数が bundled_function.description、bundled_function.info['doc']、bundled_function._fun.doc をどのように公開しているかを追跡し、次に function-node のパラメータと関連する optimizer がそれらの値をどのように使用するかを追跡します。完了とは、テンプレート化された docstring を提供でき、そのレンダリングされたテキストが function node のパラメータと関連する optimizer の両方に表示される、サポートされた方法があることを意味します。

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

説明

Hi,

I want to use Trace to build an application to let non-engineers optimized code for certain tasks. Ideally I would like to have an f-string in place of the docstring for a number of bundled functions that are methods on classes decorated by @model but of course python requires docstrings be a string literal. I'm REALLY trying to avoid resorting to a templating library for this. Currently I am trying to update the docstring of a number of bundled functions through some combination of bundled_function.description bundled_function.info['doc'] bundled_function._fun.__doc__ but so far no matter what I do I can't see the new docstring in the parameters of either the function node or in the associated optimizers.

Do you all have a suggestion of how I could implement a templated docstring? For reference here's a SUPER minimal example of what I mean:

@bundle some_func(input_data):
f"""input_data is {data_description}. 
You need to {task_description}. 
Make sure you don't {caveats_description}.
"""
    pass
主要言語
Python
スター
760
フォーク
63
PR マージ指標
30日以内にマージされた PR はありません

環境構築

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

はじめの一歩

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

microsoft/Trace のほかの issue

microsoft/Trace の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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