Skip to content
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
2 changes: 1 addition & 1 deletion src/apm_cli/commands/deps/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _count_package_files(package_path: Path) -> tuple[int, int]:
return 0, workflow_count

context_count = 0
context_dirs = ['instructions', 'chatmodes', 'contexts']
context_dirs = ['instructions', 'chatmodes', 'context']
Comment thread
edenfunf marked this conversation as resolved.

for context_dir in context_dirs:
context_path = apm_dir / context_dir
Expand Down
8 changes: 3 additions & 5 deletions tests/unit/test_deps_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
Covers the pure helpers that scan, count, and describe installed packages.
"""

import tempfile
from pathlib import Path
from unittest.mock import patch

import pytest

Expand Down Expand Up @@ -233,10 +231,10 @@ def test_chatmodes_counted_as_context(self, tmp_path):
assert ctx == 1

def test_contexts_dir_counted(self, tmp_path):
"""Files in .apm/contexts/ are counted as context."""
"""Files in .apm/context/ (singular) are counted as context."""
apm = _make_apm_dir(tmp_path)
(apm / "contexts").mkdir()
(apm / "contexts" / "c.md").write_text("# c")
(apm / "context").mkdir()
(apm / "context" / "c.md").write_text("# c")
ctx, _ = _count_package_files(tmp_path)
assert ctx == 1

Expand Down
Loading