How to create required CLI config options?
- 主要言語
- Python
- スター
- 653
- フォーク
- 217
- 平均マージ
- 2日 21時間
- マージ済み PR(30日)
- 2
説明
In https://github.com/ipython/traitlets/issues/490 this issue was raised and then closed by @rmorshea.
However,
* [searching the docs for mandatory](https://traitlets.readthedocs.io/en/stable/search.html?q=mandatory#) yields nothing
* [searching the docs for required](https://traitlets.readthedocs.io/en/stable/search.html?q=required#) doesnt yield any relevant docs.
So:
1. How does one flag an attribute as mandatory?
2. Is this documented and did I miss it?
Here is a code sample for you to elide with what is necessary to make the `req` attribute mandatory:
```python
class App(Application):
optional_arg = Int(config=True)
req = Unicode(config=True)
```
I'm expecting an exception to be thrown when I invoke this app without providing req:
```
python my_app.py --App.optional_arg=5
```
コントリビューションガイド
調査の方向性
Start with the linked traitlets issue #490 and the documentation searches for “mandatory” and “required.” Trace how Application config options are validated for the sample App, then document the supported way to require req, or clearly state that it is not supported. Confirm the documented behavior with the command shown in the issue.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- cli, documentation
- issue の種類
- ドキュメント
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100