Hugging Face Deployer commited on
Commit
6ee5066
·
1 Parent(s): 2f203f5

Deploy explorer to Hugging Face Spaces

Browse files
Files changed (4) hide show
  1. .gitignore +4 -0
  2. deploy.sh +6 -51
  3. pyproject.toml +0 -26
  4. uv.lock +0 -0
.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ *.egg-info/
deploy.sh CHANGED
@@ -11,53 +11,9 @@ NC='\033[0m'
11
 
12
  echo -e "${BLUE}=== Data360-MCP HF Space Deployment (from evals/deepeval_visualization) ===${NC}"
13
 
14
- # Navigate to the workspace root
15
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
16
- WORKSPACE_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
17
-
18
- # Define paths relative to workspace root
19
- DEPLOY_DIR="$WORKSPACE_ROOT/evals/deepeval_visualization"
20
-
21
- # Copy source and dependency files to deploy dir to make it self-contained
22
- echo "Copying application files to deploy directory..."
23
- mkdir -p "$DEPLOY_DIR/evals"
24
- cp -r "$WORKSPACE_ROOT/src" "$DEPLOY_DIR/"
25
- cp "$WORKSPACE_ROOT/pyproject.toml" "$DEPLOY_DIR/"
26
- # Strip workspace and source references from the copied pyproject.toml
27
- python3 -c '
28
- with open("'"$DEPLOY_DIR"'/pyproject.toml", "r") as f:
29
- lines = f.readlines()
30
- new_lines = []
31
- skip = False
32
- for line in lines:
33
- if "[tool.uv.workspace]" in line:
34
- skip = True
35
- continue
36
- if "[tool.uv.sources]" in line:
37
- skip = True
38
- continue
39
- if skip and (line.startswith("[") or line.strip() == ""):
40
- if line.strip().startswith("["):
41
- skip = False
42
- else:
43
- skip = False
44
- continue
45
- if not skip:
46
- new_lines.append(line)
47
- with open("'"$DEPLOY_DIR"'/pyproject.toml", "w") as f:
48
- f.writelines(new_lines)
49
- '
50
- cp "$WORKSPACE_ROOT/uv.lock" "$DEPLOY_DIR/"
51
- cp "$WORKSPACE_ROOT/evals/interactive_explorer.py" "$DEPLOY_DIR/evals/"
52
-
53
- # Clean up any pycache or python build artifacts from the copied files
54
- echo "Cleaning up python build artifacts and pycache..."
55
- find "$DEPLOY_DIR" -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
56
- find "$DEPLOY_DIR" -name "*.pyc" -delete 2>/dev/null || true
57
- find "$DEPLOY_DIR" -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
58
-
59
  # Navigate to deploy directory
60
- cd "$DEPLOY_DIR"
 
61
 
62
  # Initialize git if not already a repo
63
  if [ ! -d ".git" ]; then
@@ -79,16 +35,15 @@ else
79
  echo -e "Found existing 'space' remote pointing to: $REMOTE_URL"
80
  fi
81
 
82
- # Stage and commit locally inside the deploy folder
 
83
  git add -A
 
 
84
  git commit -m "Deploy explorer to Hugging Face Spaces" || echo "No changes to commit"
85
 
86
  # Push to Hugging Face Space
87
  echo -e "${BLUE}Pushing code to Hugging Face Space remote...${NC}"
88
  git push --force space main
89
 
90
- # Clean up copied files to keep local workspace clean
91
- echo "Cleaning up copied files from deploy directory..."
92
- rm -rf src pyproject.toml uv.lock evals
93
-
94
  echo -e "${GREEN}Deployment complete! Your Space is building at: $REMOTE_URL${NC}"
 
11
 
12
  echo -e "${BLUE}=== Data360-MCP HF Space Deployment (from evals/deepeval_visualization) ===${NC}"
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  # Navigate to deploy directory
15
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
16
+ cd "$SCRIPT_DIR"
17
 
18
  # Initialize git if not already a repo
19
  if [ ! -d ".git" ]; then
 
35
  echo -e "Found existing 'space' remote pointing to: $REMOTE_URL"
36
  fi
37
 
38
+ # Ensure build artifacts and pycache are ignored
39
+ echo "Staging files..."
40
  git add -A
41
+
42
+ # Stage and commit locally inside the deploy folder
43
  git commit -m "Deploy explorer to Hugging Face Spaces" || echo "No changes to commit"
44
 
45
  # Push to Hugging Face Space
46
  echo -e "${BLUE}Pushing code to Hugging Face Space remote...${NC}"
47
  git push --force space main
48
 
 
 
 
 
49
  echo -e "${GREEN}Deployment complete! Your Space is building at: $REMOTE_URL${NC}"
pyproject.toml CHANGED
@@ -16,22 +16,13 @@ dependencies = [
16
  "pydantic-settings>=2.0.0",
17
  "python-dotenv>=1.0.0",
18
  "draco @ git+https://github.com/avsolatorio/draco2.git@data360-mcp",
19
- "opencensus-ext-azure>=1.1.13",
20
- "azure-monitor-opentelemetry>=1.6.0",
21
  "pandas>=3.0.0",
22
  "cachetools>=6.2.4",
23
  "scikit-learn>=1.8.0",
24
- "opentelemetry-instrumentation-httpx>=0.50b0",
25
- "opentelemetry-sdk>=1.28.0",
26
- "opentelemetry-exporter-otlp>=1.28.0",
27
  "vl-convert-python>=1.9.0.post1",
28
  "huggingface-hub",
29
  ]
30
 
31
- [project.optional-dependencies]
32
- # LangChain / LangGraph client (workspace package); use: uv sync --extra agent
33
- agent = ["data360-mcp-agent"]
34
-
35
  [build-system]
36
  requires = ["setuptools>=42", 'setuptools-scm']
37
  build-backend = "setuptools.build_meta"
@@ -42,23 +33,6 @@ where = ["src"]
42
  [tool.setuptools.package-data]
43
  data360 = ["tool_contract_version.json", "databases.json", "ref_area_groups.json"]
44
 
45
- [dependency-groups]
46
- dev = [
47
- "data360-mcp-agent",
48
- "pre-commit>=4.5.0",
49
- "pyright>=1.1.407",
50
- "ruff>=0.14.8",
51
- "poethepoet>=0.27.0",
52
- "pytest>=8.0.0",
53
- "pytest-asyncio>=0.23.0",
54
- "pytest-httpx>=0.27.0",
55
- "pytest-cov>=4.1.0",
56
- "pip-licenses>=5.0.0",
57
- "pip-audit>=2.10.0",
58
- "requests>=2.32.0",
59
- "deepeval>=4.1.0",
60
- ]
61
-
62
  [tool.ruff.lint]
63
  select = ['I', 'UP', 'PL', 'F401']
64
 
 
16
  "pydantic-settings>=2.0.0",
17
  "python-dotenv>=1.0.0",
18
  "draco @ git+https://github.com/avsolatorio/draco2.git@data360-mcp",
 
 
19
  "pandas>=3.0.0",
20
  "cachetools>=6.2.4",
21
  "scikit-learn>=1.8.0",
 
 
 
22
  "vl-convert-python>=1.9.0.post1",
23
  "huggingface-hub",
24
  ]
25
 
 
 
 
 
26
  [build-system]
27
  requires = ["setuptools>=42", 'setuptools-scm']
28
  build-backend = "setuptools.build_meta"
 
33
  [tool.setuptools.package-data]
34
  data360 = ["tool_contract_version.json", "databases.json", "ref_area_groups.json"]
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  [tool.ruff.lint]
37
  select = ['I', 'UP', 'PL', 'F401']
38
 
uv.lock CHANGED
The diff for this file is too large to render. See raw diff