feat: provide global option -j/--workers (#190)#204
feat: provide global option -j/--workers (#190)#204sushant-suse merged 3 commits intoopenSUSE:mainfrom
Conversation
Signed-off-by: sushant-suse <[email protected]>
Coverage ReportFor commit 7d32bb9 Click to expand Coverage Report Name Stmts Miss Branch BrPart Cover
--------------------------------------------------------------------------------
+ src/docbuild/models/deliverable.py 180 1 22 0 99.5%
+ src/docbuild/cli/cmd_check/process.py 58 0 22 1 98.8%
+ src/docbuild/models/manifest.py 111 1 12 1 98.4%
+ src/docbuild/utils/pidlock.py 79 1 14 1 97.8%
+ src/docbuild/cli/cmd_cli.py 96 1 10 2 97.2%
+ src/docbuild/cli/cmd_validate/process.py 178 5 52 4 96.1%
+ src/docbuild/cli/callback.py 35 0 10 2 95.6%
- src/docbuild/cli/cmd_config/__init__.py 9 1 0 0 88.9%
- src/docbuild/config/xml/stitch.py 47 5 12 0 88.1%
- src/docbuild/cli/cmd_metadata/metaprocess.py 215 26 66 13 82.6%
- src/docbuild/cli/cmd_check/__init__.py 18 5 2 0 65.0%
- src/docbuild/cli/cmd_build/__init__.py 13 5 0 0 61.5%
- src/docbuild/cli/cmd_metadata/__init__.py 27 10 2 0 58.6%
- src/docbuild/cli/cmd_config/environment.py 11 6 2 0 38.5%
--------------------------------------------------------------------------------
+ TOTAL 2923 67 688 24 97.0%
46 files skipped due to complete coverage. |
There was a problem hiding this comment.
Thanks Sushant! 👍
I've added some questions below.
If we allow => Already done in #201max_workers in the app config, shouldn't we adjust the AppConfig model accordingly?
I'm wondering if we should change the AppConfig.max_workers field to int. 🤔 WDYT?
Hi Toms, Good call. Since our validator already resolves the strings into integers, I'll change the type hint to |
Signed-off-by: sushant-suse <[email protected]>
|
@sushant-suse Forgot one thing: Please add a news fragment file. 😉 Then it's ready to merge. Just add it and merge it, no need to ask me again. 🙂 |
Signed-off-by: sushant-suse <[email protected]>
This PR adds the global CLI option
-j/--workersto allow users to override concurrency settings from the command line.Changes:
-j/--workersto the maindocbuildcommand group.DocBuildContextto use theAppConfigmodel type for better type safety and IDE support.Validation:
tests/cli/test_worker_option.pyto verify that the flag is correctly parsed and validated.