Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove breakpoints, fix dry-run in SugarStats, and add unittests #129

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
shell: bash -l {0}

strategy:
fail-fast: false
matrix:
python_version:
- "3.9"
Expand Down
2 changes: 1 addition & 1 deletion .makim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ groups:
clean:
env-file: .env
tasks:
all:
tmp:
help: Remove build artifacts, compiled files, and cache
run: |
rm -f .coverage
Expand Down
128 changes: 31 additions & 97 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exclude = [
"sugar" = "sugar.__main__:run_app"

[tool.poetry.dependencies]
python = ">=3.8.1,<4"
python = ">=3.9,<4"
Jinja2 = ">=2"
sh = ">=2.0.0"
pyyaml = ">=6"
Expand Down Expand Up @@ -56,7 +56,7 @@ mkdocs-literate-nav = ">=0.6.0"
mkdocs-macros-plugin = ">=0.7.0,<1"
mkdocs-material = ">=9.1.15"
mkdocstrings = {version=">=0.19.0", extras=["python"]}
makim = ">=1.12.1"
makim = ">=1.18.1"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
3 changes: 0 additions & 3 deletions src/sugar/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,6 @@ def create_args_string(args: dict[str, dict[str, str]]) -> str:
default_value = spec.get('default', '')
default_value = get_default_value_str(arg_type, default_value)

if isinstance(help_text, tuple):
breakpoint()

arg_str = arg_template.format(
**{
'arg_name': name_clean,
Expand Down
1 change: 1 addition & 0 deletions src/sugar/extensions/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def _load_root_services(self) -> None:
}
}
self.defaults['group'] = 'main'
self.group_selected = 'main'
self.service_group = deepcopy(self.config['groups']['main'])
del self.config['services']

Expand Down
1 change: 0 additions & 1 deletion src/sugar/extensions/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ def _cmd_kill(
"""Force stop service containers."""
services_names = self._get_services_names(services=services, all=all)
options_args = self._get_list_args(options)
breakpoint()
self._call_backend_app(
'kill', services=services_names, options_args=options_args
)
Expand Down
3 changes: 3 additions & 0 deletions src/sugar/extensions/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ def _cmd_plot(
_err=_err,
)

if self.dry_run:
return

raw_out = _out.getvalue()

if not raw_out:
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Configuration fixtures for tests."""
Loading