KhalilGuetari commited on
Commit
316c2dc
·
1 Parent(s): 0c257f9

build source code as package

Browse files
app.py CHANGED
@@ -8,8 +8,8 @@ It imports and launches the main Gradio application.
8
  # import os
9
  # import sys
10
 
11
- # Add src directory to path for imports
12
- # sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'src'))
13
 
14
  # from src.hf_eda_mcp.server import create_gradio_app
15
  from hf_eda_mcp.server import create_gradio_app
 
8
  # import os
9
  # import sys
10
 
11
+ # Add src directory to path for imports (needed for HF Spaces)
12
+ # sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))
13
 
14
  # from src.hf_eda_mcp.server import create_gradio_app
15
  from hf_eda_mcp.server import create_gradio_app
pyproject.toml CHANGED
@@ -21,9 +21,14 @@ license = {text = "Apache-2.0"}
21
  hf-cli = [
22
  "huggingface-hub[cli]>=1.1.4",
23
  ]
 
24
  [build-system]
25
- requires = ["pdm-backend"]
26
- build-backend = "pdm.backend"
 
 
 
 
27
 
28
 
29
  [tool.pdm.scripts]
 
21
  hf-cli = [
22
  "huggingface-hub[cli]>=1.1.4",
23
  ]
24
+
25
  [build-system]
26
+ requires = ["setuptools>=61.0.0", "wheel"]
27
+ build-backend = "setuptools.build_meta"
28
+
29
+ [tool.setuptools]
30
+ packages = ["hf_eda_mcp"]
31
+ package-dir = {"" = "src"}
32
 
33
 
34
  [tool.pdm.scripts]
src/hf_eda_mcp/__init__.py CHANGED
@@ -5,7 +5,7 @@ A Model Context Protocol (MCP) server that provides tools for
5
  Exploratory Data Analysis (EDA) of datasets hosted on HuggingFace.
6
  """
7
 
8
- from .server import create_gradio_app, launch_server
9
 
10
  __version__ = "0.1.0"
11
  __all__ = ["create_gradio_app", "launch_server"]
 
5
  Exploratory Data Analysis (EDA) of datasets hosted on HuggingFace.
6
  """
7
 
8
+ from hf_eda_mcp.server import create_gradio_app, launch_server
9
 
10
  __version__ = "0.1.0"
11
  __all__ = ["create_gradio_app", "launch_server"]
src/hf_eda_mcp/__main__.py CHANGED
@@ -7,8 +7,8 @@ python -m hf_eda_mcp
7
 
8
  import argparse
9
  import sys
10
- from .config import ServerConfig
11
- from .server import launch_server
12
 
13
 
14
  def main():
 
7
 
8
  import argparse
9
  import sys
10
+ from hf_eda_mcp.config import ServerConfig
11
+ from hf_eda_mcp.server import launch_server
12
 
13
 
14
  def main():
src/hf_eda_mcp/integrations/hf_client.py CHANGED
@@ -14,7 +14,6 @@ from requests.exceptions import RequestException, ConnectionError, Timeout
14
  from hf_eda_mcp.error_handling import (
15
  retry_with_backoff,
16
  RetryConfig,
17
- format_error_response,
18
  log_error_with_context,
19
  get_dataset_suggestions
20
  )
 
14
  from hf_eda_mcp.error_handling import (
15
  retry_with_backoff,
16
  RetryConfig,
 
17
  log_error_with_context,
18
  get_dataset_suggestions
19
  )
src/hf_eda_mcp/tools/__init__.py CHANGED
@@ -4,13 +4,13 @@ EDA tools module for HuggingFace datasets.
4
  This package contains individual EDA functions that will be exposed as MCP tools.
5
  """
6
 
7
- from .metadata import get_dataset_metadata
8
- from .sampling import (
9
  get_dataset_sample,
10
  get_dataset_sample_with_indices,
11
  get_available_splits,
12
  )
13
- from .analysis import analyze_dataset_features
14
 
15
  __all__ = [
16
  # Metadata tools
 
4
  This package contains individual EDA functions that will be exposed as MCP tools.
5
  """
6
 
7
+ from hf_eda_mcp.tools.metadata import get_dataset_metadata
8
+ from hf_eda_mcp.tools.sampling import (
9
  get_dataset_sample,
10
  get_dataset_sample_with_indices,
11
  get_available_splits,
12
  )
13
+ from hf_eda_mcp.tools.analysis import analyze_dataset_features
14
 
15
  __all__ = [
16
  # Metadata tools