Skip to content

Commit

Permalink
Bump version to 0.1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
amrutha97 committed Dec 24, 2024
1 parent cec82a1 commit b6f8460
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion preswald/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Initialize the Preswald package
__version__ = "0.1.13"
__version__ = "0.1.14"

from .core import track, connect, plotly
from .components import (
Expand Down
18 changes: 11 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sys
from pathlib import Path


class BuildFrontendCommand(Command):
description = 'build frontend assets'
user_options = []
Expand All @@ -25,21 +26,22 @@ def run(self):
def _build_frontend(self):
frontend_dir = Path(__file__).parent / 'frontend'
if not frontend_dir.exists():
print(f"Frontend directory not found at {frontend_dir}", file=sys.stderr)
print(f"Frontend directory not found at {
frontend_dir}", file=sys.stderr)
return

print("Building frontend assets...")
try:
# Run npm install with error handling
result = subprocess.run(['npm', 'install'], cwd=frontend_dir,
capture_output=True, text=True, check=False)
result = subprocess.run(['npm', 'install'], cwd=frontend_dir,
capture_output=True, text=True, check=False)
if result.returncode != 0:
print(f"npm install failed: {result.stderr}", file=sys.stderr)
raise Exception("npm install failed")

# Run npm build with error handling
result = subprocess.run(['npm', 'run', 'build'], cwd=frontend_dir,
capture_output=True, text=True, check=False)
result = subprocess.run(['npm', 'run', 'build'], cwd=frontend_dir,
capture_output=True, text=True, check=False)
if result.returncode != 0:
print(f"npm build failed: {result.stderr}", file=sys.stderr)
raise Exception("npm build failed")
Expand All @@ -51,7 +53,8 @@ def _build_frontend(self):
print(f"Failed to build frontend: {str(e)}", file=sys.stderr)
raise
except Exception as e:
print(f"Unexpected error building frontend: {str(e)}", file=sys.stderr)
print(f"Unexpected error building frontend: {
str(e)}", file=sys.stderr)
raise

def _copy_assets(self, frontend_dir):
Expand Down Expand Up @@ -88,10 +91,11 @@ def _copy_assets(self, frontend_dir):
else:
shutil.copy2(item, dest)


# Setup configuration
setup(
name="preswald",
version="0.1.0",
version="0.1.14",
author="Structured",
author_email="founders@structuredlabs.com",
description="A lightweight data workflow SDK.",
Expand Down

0 comments on commit b6f8460

Please sign in to comment.