Roadmap for `v1.0.0`
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 20/100
- Issue 類型
- 功能
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- python
- 領域
- testing-qa
研究方向
首先檢視設定選項,以及此 issue 中列出的尚未解決的 breaking 和 non-breaking 變更,然後檢查所參照的 remove_text 進入點所在的 pytest_mpl/plugin.py。在開始實作之前,該 issue 需要維護者就範圍、警告期間和預設值作出決定;完成這項工作需要一份達成共識的路線圖及相應的變更。
由索引模型根據 Issue 內容生成。
描述
I reviewed all the configuration options which are used in the code and found quite a few inconsistencies. I have listed proposed fixes for them, separated into breaking and non-breaking changes. We can add warning for the breaking changes now, and then change in v1.0.0.
Let's discuss these lists. Are there any items which should be added or removed? For the breaking changes, how long of a warning period should we have? For any of them, should we only start warning in v1.0.0 and then change in v1.1.0?
Review of configuration options
| Option | kwarg | CLI | ini | default |
|---|---|---|---|---|
| Enable testing | N/A | --mpl |
N/A | False |
| Enable baseline image generation, at specified directory path (relative to where pytest was run) | N/A | --mpl-generate-path |
N/A | None |
| Enable baseline hash generation, at specified file path (relative to where pytest was run) | N/A | --mpl-generate-hash-library |
N/A | None |
| Directory containing baseline images (relative to the test file) |
baseline_dir |
--mpl-baseline-path (relative to where pytest was run) |
baseline/ |
|
Whether --mpl-baseline-path should also be relative to the test file |
N/A | --mpl-baseline-relative |
N/A | False |
| Filename of the baseline image | filename |
N/A | N/A | test name |
| Whether to include the module name in the baseline image filename | ? | mpl-use-full-test-name |
False |
|
| File containing baseline hashes (relative to the test file) |
hash_library |
--mpl-hash-library |
no hash comparison | |
| RMS tolerance | tolerance |
2 |
||
| Whether to standardise metadata | deterministic |
True (PNG: False) |
||
| kwargs to pass to savefig | savefig_kwargs |
N/A | N/A | {} |
| Matplotlib style | style |
classic |
||
| Whether to remove axis tick labels | remove_text |
False |
||
| Matplotlib backend | backend |
agg |
||
| Directory to write testing artifacts to (relative to where pytest was run) |
N/A | --mpl-results-path |
mpl-results-path |
temp dir |
| Whether to save result images for passing tests | N/A | --mpl-results-always |
mpl-results-always |
False (True if generating a HTML summary) |
| Which test summaries to generate, if any | N/A | --mpl-generate-summary={html,json,basic-html} |
None |
Notes
- N/A are options which we don't think should exist.
- Empty boxes are options which we do think should exist.
- ? are options which could exist but would be of limited use.
- Due to how paths are computed by Python, the baseline directory and hash library paths can be absolute. In this case
--mpl-baseline-relativeand what directory the paths are interpreted to be relative to does not have any effect. - Path specified in kwargs should be relative to the test file, and paths specified in CLI and ini options should be relative to where pytest was run.
Non-breaking changes
- Document that backend can be specified. #199
- Document the option to use the full test name. #199
- Document that
mpl-use-full-test-nameini overrides thefilenamekwarg. #199 - Add
mpl-baseline-pathini option (relative to where pytest was run). #181 - Expand
mpl-use-full-test-nameini option to CLI (and maybe kwarg). #181 - Add
mpl-hash-libraryini option (relative to where pytest was run). #181 - Add
--mpl-default-toleranceCLI andmpl-default-toleranceini options. #181 - Add CLI and ini options for
deterministic. #197 - Add
--mpl-default-styleCLI andmpl-default-styleini options. #181 - Add CLI and ini options for
remove_text. - Add CLI and ini options for
backend. #181 - Add
generate-summaryini option for generating test summaries. #181
Breaking changes
-
--mpl-hash-libraryshould be relative to where pytest was run (to match--mpl-baseline-path). - Local
hash_librarykwarg should take precedence over global--mpl-hash-libraryCLI option. #154 - Deprecate the use of multiple hash libraries in the same pytest run (not necessary because files are small and include the full module path anyway). #154
- Deprecate the use of multiple testing modes in the same pytest run (e.g. warn if one test only has hash comparison while the others only have image comparison)
- Use Matplotlib's default style instead of
'classic'. - Change the default RMS tolerance to
0. - Enable deterministic PNG files by default.
- Deprecate
remove_textkwarg and replace with better namedremove_ticks_and_titles - (???) Add a
remove_textkwarg that actually removes all text. - (???) Rename
baseline_dir/--mpl-baseline-pathto have consistent name.
- 主要語言
- Python
- 星號
- 274
- 分支
- 53
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
matplotlib/pytest-mpl 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 48/100
matplotlib/pytest-mpl#264 · 2 則留言 · 1 個 reaction ·
-
難度 3/5 1-2 天 新手友好度 35/100
matplotlib/pytest-mpl#263 · 3 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 55/100
matplotlib/pytest-mpl#262 · 6 則留言 ·
-
難度 4/5 3-5 天 新手友好度 45/100
matplotlib/pytest-mpl#261 · 1 則留言 ·
-
難度 4/5 3-5 天 新手友好度 35/100
matplotlib/pytest-mpl#257 · 2 則留言 ·
查看 matplotlib/pytest-mpl 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
fossasia/eventyay-exhibition#465 · 3 則留言 · 1 個 reaction ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
area/webapp comp/desktop P2 type/bug
難度 2/5 1-3 小時 新手友好度 78/100
NousResearch/hermes-agent#163341 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
cpp-best-practices/project_validator#609 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 84/100
smart-village-solutions/smart-speech-flow#765 ·
維護者通常 1 天內回覆