regcode 0.6.0__tar.gz → 0.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. regcode-0.6.1/.gitlab-ci.yml +55 -0
  2. {regcode-0.6.0 → regcode-0.6.1}/PKG-INFO +1 -1
  3. {regcode-0.6.0 → regcode-0.6.1}/pyproject.toml +1 -1
  4. {regcode-0.6.0 → regcode-0.6.1}/regcode/__init__.py +1 -1
  5. {regcode-0.6.0 → regcode-0.6.1}/regcode/tracing.py +17 -7
  6. regcode-0.6.1/tests/conftest.py +37 -0
  7. {regcode-0.6.0 → regcode-0.6.1}/tests/test_context_manager.py +1 -1
  8. {regcode-0.6.0 → regcode-0.6.1}/uv.lock +1 -1
  9. regcode-0.6.0/tests/conftest.py +0 -7
  10. {regcode-0.6.0 → regcode-0.6.1}/.gitignore +0 -0
  11. {regcode-0.6.0 → regcode-0.6.1}/.python-version +0 -0
  12. {regcode-0.6.0 → regcode-0.6.1}/.qwen/settings.json +0 -0
  13. {regcode-0.6.0 → regcode-0.6.1}/AGENTS.md +0 -0
  14. {regcode-0.6.0 → regcode-0.6.1}/GOALS.md +0 -0
  15. {regcode-0.6.0 → regcode-0.6.1}/README.md +0 -0
  16. {regcode-0.6.0 → regcode-0.6.1}/config.yaml.template +0 -0
  17. {regcode-0.6.0 → regcode-0.6.1}/main.py +0 -0
  18. {regcode-0.6.0 → regcode-0.6.1}/regcode/cli.py +0 -0
  19. {regcode-0.6.0 → regcode-0.6.1}/regcode/config.py +0 -0
  20. {regcode-0.6.0 → regcode-0.6.1}/regcode/conversation_manager.py +0 -0
  21. {regcode-0.6.0 → regcode-0.6.1}/regcode/dependencies.py +0 -0
  22. {regcode-0.6.0 → regcode-0.6.1}/regcode/main.py +0 -0
  23. {regcode-0.6.0 → regcode-0.6.1}/regcode/monty_sandbox.py +0 -0
  24. {regcode-0.6.0 → regcode-0.6.1}/regcode/permissions.py +0 -0
  25. {regcode-0.6.0 → regcode-0.6.1}/regcode/sandbox.py +0 -0
  26. {regcode-0.6.0 → regcode-0.6.1}/regcode/tools/__init__.py +0 -0
  27. {regcode-0.6.0 → regcode-0.6.1}/regcode/tools/base.py +0 -0
  28. {regcode-0.6.0 → regcode-0.6.1}/regcode/tools/builtins.py +0 -0
  29. {regcode-0.6.0 → regcode-0.6.1}/regcode/tools/registry.py +0 -0
  30. {regcode-0.6.0 → regcode-0.6.1}/regcode/tools/review_notes.py +0 -0
  31. {regcode-0.6.0 → regcode-0.6.1}/regcode/tools/web_crawl.py +0 -0
  32. {regcode-0.6.0 → regcode-0.6.1}/regcode/tools/web_search.py +0 -0
  33. {regcode-0.6.0 → regcode-0.6.1}/regcode/tui.py +0 -0
  34. {regcode-0.6.0 → regcode-0.6.1}/tests/__init__.py +0 -0
  35. {regcode-0.6.0 → regcode-0.6.1}/tests/test_api.py +0 -0
  36. {regcode-0.6.0 → regcode-0.6.1}/tests/test_cli.py +0 -0
  37. {regcode-0.6.0 → regcode-0.6.1}/tests/test_config.py +0 -0
  38. {regcode-0.6.0 → regcode-0.6.1}/tests/test_dependencies.py +0 -0
  39. {regcode-0.6.0 → regcode-0.6.1}/tests/test_main.py +0 -0
  40. {regcode-0.6.0 → regcode-0.6.1}/tests/test_monty_sandbox.py +0 -0
  41. {regcode-0.6.0 → regcode-0.6.1}/tests/test_osv_cve.py +0 -0
  42. {regcode-0.6.0 → regcode-0.6.1}/tests/test_provider_extra.py +0 -0
  43. {regcode-0.6.0 → regcode-0.6.1}/tests/test_review_notes.py +0 -0
  44. {regcode-0.6.0 → regcode-0.6.1}/tests/test_web_search.py +0 -0
@@ -0,0 +1,55 @@
1
+ # .gitlab-ci.yml
2
+
3
+ stages:
4
+ - test
5
+ - build
6
+ - publish
7
+
8
+ variables:
9
+ UV_PIP_PREVENT_WRITE_BACK: "1"
10
+
11
+ lint:
12
+ stage: test
13
+ image: python:3.12-slim
14
+ before_script:
15
+ - pip install uv
16
+ script:
17
+ - uv venv .venv
18
+ - source .venv/bin/activate
19
+ - uv pip install ".[dev]"
20
+ - uv run ruff check regcode/ tests/
21
+
22
+ pytest:
23
+ stage: test
24
+ image: python:3.12-slim
25
+ before_script:
26
+ - pip install uv
27
+ script:
28
+ - uv venv .venv
29
+ - source .venv/bin/activate
30
+ - uv pip install ".[dev]"
31
+ - uv run pytest tests/ -v --tb=short
32
+
33
+ build:
34
+ stage: build
35
+ image: python:3.12-slim
36
+ before_script:
37
+ - pip install uv
38
+ script:
39
+ - uv build
40
+ artifacts:
41
+ paths:
42
+ - dist/
43
+ expire_in: 1 week
44
+
45
+ publish:
46
+ stage: publish
47
+ image: python:3.12-slim
48
+ before_script:
49
+ - pip install uv
50
+ script:
51
+ - uv publish --token $UV_PUBLISH_TOKEN
52
+ rules:
53
+ - if: $CI_COMMIT_BRANCH == "main"
54
+ when: on_success
55
+ - when: never
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: regcode
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Minimalistic coding agent with Python API and CLI
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: click>=8.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "regcode"
3
- version = "0.6.0"
3
+ version = "0.6.1"
4
4
  description = "Minimalistic coding agent with Python API and CLI"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -2,4 +2,4 @@ from regcode.config import Config
2
2
  from regcode.main import Agent, AgentStatus, ToolCall
3
3
 
4
4
  __all__ = ["Agent", "Config", "AgentStatus", "ToolCall"]
5
- __version__ = "0.6.0"
5
+ __version__ = "0.6.1"
@@ -39,9 +39,17 @@ def _initialize_tracing(config: Config | None = None) -> None:
39
39
  if not _tracing_config.tracing_enabled():
40
40
  return
41
41
 
42
- if _tracing_config.mlflow_requires_auth and _tracing_config.mlflow_username and _tracing_config.mlflow_password:
43
- MLFLOW_TRACKING_USERNAME.set(_tracing_config.mlflow_username)
44
- MLFLOW_TRACKING_PASSWORD.set(_tracing_config.mlflow_password)
42
+ if (
43
+ _tracing_config.mlflow_requires_auth
44
+ and _tracing_config.mlflow_username
45
+ and _tracing_config.mlflow_password
46
+ ):
47
+ MLFLOW_TRACKING_USERNAME.set(
48
+ _tracing_config.mlflow_username
49
+ )
50
+ MLFLOW_TRACKING_PASSWORD.set(
51
+ _tracing_config.mlflow_password
52
+ )
45
53
 
46
54
  _logger.info(f"Setting up MLflow tracing with URL: {_tracing_config.mlflow_url}")
47
55
 
@@ -76,14 +84,16 @@ def agent_trace(user_message: str, tool_calls_count: int = 0) -> Iterator[None]:
76
84
  with agent_trace("Fix the bug", 3):
77
85
  result = agent.chat("Fix the bug")
78
86
  """
79
- if not _tracing_initialized or not _tracing_config or not _tracing_config.tracing_enabled():
87
+ if (
88
+ not _tracing_initialized
89
+ or not _tracing_config
90
+ or not _tracing_config.tracing_enabled()
91
+ ):
80
92
  yield
81
93
  return
82
94
 
83
- trace_name = f"agent.turn.{tool_calls_count}tools"
84
-
85
95
  try:
86
- with mlflow.start_trace() as trace:
96
+ with mlflow.start_trace():
87
97
  # Log input attributes for better trace UI
88
98
  mlflow.set_tag("user_message", user_message[:200])
89
99
  mlflow.set_tag("tool_calls", tool_calls_count)
@@ -0,0 +1,37 @@
1
+ import sys
2
+ from pathlib import Path
3
+ from unittest.mock import patch
4
+
5
+ import pytest
6
+
7
+ # Ensure the project root is on sys.path for imports
8
+ project_root = Path(__file__).parent.parent
9
+ if str(project_root) not in sys.path:
10
+ sys.path.insert(0, str(project_root))
11
+
12
+
13
+ @pytest.fixture(autouse=True)
14
+ def mock_config_load(request):
15
+ """Prevent tests from reading real config.yaml.
16
+
17
+ Patches ``Config.load`` on modules that import it so that
18
+ ``ContextManager``, ``Agent``, and other callers all get a
19
+ clean, deterministic Config instead of reading from disk.
20
+
21
+ Excluded: tests in test_config.py (they test Config.load itself).
22
+ """
23
+ # Skip for tests in the config test module
24
+ if (
25
+ "test_config" in request.node.name or
26
+ request.node.module.__name__ == "tests.test_config"
27
+ ):
28
+ yield
29
+ return
30
+
31
+ from regcode.config import Config
32
+
33
+ default = Config()
34
+
35
+ with patch("regcode.config.Config.load", return_value=default):
36
+ with patch("regcode.conversation_manager.Config.load", return_value=default):
37
+ yield
@@ -6,7 +6,7 @@ from regcode.conversation_manager import ContextManager
6
6
  def test_context_manager_init():
7
7
  cm = ContextManager()
8
8
  assert cm.context_window == 128000
9
- assert cm.max_tokens == 32000
9
+ assert cm.max_tokens == 4096
10
10
  assert cm.compaction_threshold == 0.8
11
11
  assert cm.messages == []
12
12
  assert cm._review_notes == []
@@ -3805,7 +3805,7 @@ wheels = [
3805
3805
 
3806
3806
  [[package]]
3807
3807
  name = "regcode"
3808
- version = "0.6.0"
3808
+ version = "0.6.1"
3809
3809
  source = { editable = "." }
3810
3810
  dependencies = [
3811
3811
  { name = "click" },
@@ -1,7 +0,0 @@
1
- import sys
2
- from pathlib import Path
3
-
4
- # Ensure the project root is on sys.path for imports
5
- project_root = Path(__file__).parent.parent
6
- if str(project_root) not in sys.path:
7
- sys.path.insert(0, str(project_root))
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes