Skip to content

Commit ff8872c

Browse files
committed
fix: resolve package installation and import issues - Add packages configuration to pyproject.toml for proper src layout - Change main.py import to relative import for package compatibility - Fix CliRunner test configuration for Click compatibility - Resolves ModuleNotFoundError when installing via pip/poetry
1 parent 212a140 commit ff8872c

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed
33.3 KB
Binary file not shown.

dist/contextcraft-1.0.2.tar.gz

30 KB
Binary file not shown.

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api"
66

77
[tool.poetry]
88
name = "contextcraft"
9-
version = "1.0.1"
9+
version = "1.0.2"
1010
description = "A CLI toolkit to generate comprehensive project context for LLMs."
1111
authors = ["Shourya Maheshwari <shorz2905@gmail.com>"]
1212
license = "MIT"
@@ -25,6 +25,7 @@ classifiers = [
2525
"Topic :: Software Development :: Documentation",
2626
"Topic :: Utilities"
2727
]
28+
packages = [{include = "contextcraft", from = "src"}]
2829

2930
[tool.poetry.dependencies]
3031
python = "^3.9"
@@ -123,4 +124,4 @@ exclude_dirs = ["tests"]
123124

124125
# Add a script entry point for your CLI
125126
[tool.poetry.scripts]
126-
contextcraft = "src.contextcraft.main:app" # Fixed to use correct module path
127+
contextcraft = "contextcraft.main:app"

src/contextcraft/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717
import typer
1818
from rich.console import Console
1919

20-
from src.contextcraft.utils import config_manager
21-
2220
from . import __version__
2321
from .tools import bundler, dependency_lister, flattener, git_provider, tree_generator
22+
from .utils import config_manager
2423

2524

2625
def version_callback(value: bool) -> None:

tests/test_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from src.contextcraft.utils import config_manager
1717

1818
# Create a CliRunner instance to invoke commands
19-
runner = CliRunner(mix_stderr=False)
19+
runner = CliRunner()
2020

2121
# --- Test for the 'hello' command ---
2222

0 commit comments

Comments
 (0)