Skip to content

Commit a3aca2b

Browse files
jamesbrinkclaude
andcommitted
chore: update docs and clean up whitespace in tests
- Add branch management documentation to CLAUDE.md - Remove trailing whitespace in test files - Maintain consistent indentation across test modules 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8aa3d08 commit a3aca2b

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

CLAUDE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ MCP-NixOS provides MCP resources and tools for NixOS packages, system options, H
1414

1515
Official repository: [https://github.com/utensils/mcp-nixos](https://github.com/utensils/mcp-nixos)
1616

17+
## Branch Management
18+
19+
- Default development branch is `develop`
20+
- Main release branch is `main`
21+
- Branch protection rules are enforced:
22+
- `main`: Requires PR review (1 approval), admin enforcement, no deletion, no force push
23+
- `develop`: Protected from deletion but allows force push
24+
- PRs follow the pattern: commit to `develop` → open PR to `main` → merge once approved
25+
- Branch deletion on merge is disabled to preserve branch history
26+
1727
## Architecture
1828

1929
### Core Components

tests/contexts/test_home_manager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def test_home_manager_search_tool(self, mock_import_module):
433433
mock_context = MagicMock()
434434
mock_server_module.get_home_manager_context.return_value = mock_context
435435
mock_import_module.return_value = mock_server_module
436-
436+
437437
# Setup context with search_options method
438438
mock_context.search_options.return_value = {"count": 1, "options": [{"name": "a", "description": "desc"}]}
439439

@@ -458,7 +458,7 @@ def test_home_manager_info_tool(self, mock_import_module):
458458
mock_context = MagicMock()
459459
mock_server_module.get_home_manager_context.return_value = mock_context
460460
mock_import_module.return_value = mock_server_module
461-
461+
462462
# Setup context with get_option method
463463
mock_context.get_option.return_value = {"name": "a", "found": True, "description": "desc"}
464464

@@ -480,7 +480,7 @@ def test_home_manager_info_tool_not_found(self, mock_import_module):
480480
mock_context = MagicMock()
481481
mock_server_module.get_home_manager_context.return_value = mock_context
482482
mock_import_module.return_value = mock_server_module
483-
483+
484484
# Setup context with get_option method returning not found
485485
mock_context.get_option.return_value = {"name": "option_name", "found": False, "error": "Not found"}
486486

@@ -501,7 +501,7 @@ def test_home_manager_stats_tool(self, mock_import_module):
501501
mock_context = MagicMock()
502502
mock_server_module.get_home_manager_context.return_value = mock_context
503503
mock_import_module.return_value = mock_server_module
504-
504+
505505
# Setup context with get_stats method
506506
mock_context.get_stats.return_value = {"total_options": 123, "total_categories": 5}
507507

tests/tools/test_service_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def setUp(self):
377377
# Create a mock context and server module
378378
self.mock_context = MagicMock(spec=NixOSContext)
379379
self.mock_context.es_client = MagicMock(spec=ElasticsearchClient) # Add mock es_client
380-
380+
381381
# Create a mock server module that get_nixos_context will return our mock context
382382
self.mock_server_module = MagicMock()
383383
self.mock_server_module.get_nixos_context.return_value = self.mock_context

tests/utils/test_multi_word_query.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def setUp(self):
6565
self.mock_es_client = MagicMock()
6666
self.mock_context.es_client = self.mock_es_client
6767
self.mock_context.search_options.return_value = {"options": [], "count": 0}
68-
68+
6969
# Create a mock server module that will return our context
7070
self.mock_server_module = MagicMock()
7171
self.mock_server_module.get_nixos_context.return_value = self.mock_context
@@ -93,7 +93,7 @@ def test_acme_search_issue(self, mock_import_module):
9393

9494
# Verify importlib.import_module was called with correct module
9595
mock_import_module.assert_called_with("mcp_nixos.server")
96-
96+
9797
# Verify get_nixos_context was called
9898
self.mock_server_module.get_nixos_context.assert_called_once()
9999

@@ -131,7 +131,7 @@ def test_multi_word_with_quoted_terms(self, mock_import_module):
131131

132132
# Verify importlib.import_module was called with correct module
133133
mock_import_module.assert_called_with("mcp_nixos.server")
134-
134+
135135
# Verify get_nixos_context was called
136136
self.mock_server_module.get_nixos_context.assert_called_once()
137137

0 commit comments

Comments
 (0)