[SET-2465] Scaffold COS CLI package and test integration - #1110
Open
wilkmar wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR scaffolds a new top-level cos Python package inside the existing hotsos distribution, adding an initial CLI entry point and integrating basic unit testing + coverage/tox wiring.
Changes:
- Add
cospackage scaffold withpython -m cosandcosconsole script entry points. - Add initial unit tests verifying CLI success and
--helpbehavior. - Extend tox and coverage configuration to include
cossources and COS unit test discovery.
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tox.ini | Adds COS unit test path, runs COS unit tests in tox, and includes cos in coverage sources and lint/pylint paths. |
| pyproject.toml | Includes cos* packages and adds a cos console script entry point. |
| cos/cli.py | Implements initial argparse scaffold and placeholder output for the COS CLI. |
| cos/main.py | Enables python3 -m cos execution by delegating to cos.cli.main. |
| cos/init.py | Adds module docstring and exports. |
| cos/tests/init.py | Marks COS tests as a package. |
| cos/tests/unit/init.py | Marks COS unit tests as a package. |
| cos/tests/unit/test_cli.py | Adds initial unittest-based CLI scaffold tests. |
| cos/doc/README.md | Adds initial COS documentation placeholder. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 9 changed files in this pull request and generated no new comments.
Suppressed comments (2)
cos/init.py:6
__all__lists"cli"but the module doesn’t define/importcli, sofrom cos import *will raiseAttributeError. Either remove__all__or import the submodule before defining it.
__all__ = ["cli"]
cos/tests/unit/test_cli.py:23
- The
--helptest currently only assertsSystemExitand allows argparse help text to be printed during the test run. Capture stdout and assert the exit code and key help content so the test validates the intended behavior without noisy output.
def test_help_is_available(self):
with self.assertRaises(SystemExit):
cli.main(["--help"])
wilkmar
force-pushed
the
add_cos_module
branch
from
August 19, 2026 10:36
337fecb to
fca4289
Compare
Add a new cos package scaffold with module entry points (__main__, cli.main), basic argparse wiring, and placeholder CLI output. Include initial COS docs and unit tests for CLI success and help behavior, and wire the package into project packaging, script entry points, coverage settings, and tox test paths. Signed-off-by: Marcin Wilk <marcin.wilk@canonical.com>
wilkmar
force-pushed
the
add_cos_module
branch
from
August 19, 2026 12:28
fca4289 to
01d8fec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #1109
Add a new cos package scaffold with module entry points (main, cli.main), basic argparse wiring, and placeholder CLI output.
Include initial COS docs and unit tests for CLI success and help behavior, and wire the package into project packaging, script entry points, coverage settings, and tox test paths.