Skip to content

Commit

Permalink
Upgrade to v0.1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
amrutha97 committed Dec 27, 2024
1 parent 65ad7b4 commit a93e8a0
Show file tree
Hide file tree
Showing 9 changed files with 197 additions and 179 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/widgets/MarkdownRendererWidget.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';

const MarkdownRendererWidget = ({ markdown, value, error }) => {
const content = markdown || value || '';
Expand All @@ -14,7 +14,7 @@ const MarkdownRendererWidget = ({ markdown, value, error }) => {

return (
<div className="prose prose-sm max-w-none">
<ReactMarkdown>{content}</ReactMarkdown>
<ReactMarkdown remarkPlugins={[remarkGfm]}>{content}</ReactMarkdown>
</div>
);
};
Expand Down
4 changes: 3 additions & 1 deletion frontend/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/** @type {import('tailwindcss').Config} */
import typography from "@tailwindcss/typography";

export default {
content: [
"./index.html", // Include index.html
Expand All @@ -7,5 +9,5 @@ export default {
theme: {
extend: {}, // Extend default theme here
},
plugins: [],
plugins: [typography],
};
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.16"
__version__ = "0.1.17"

from .core import track, connect, connections
from .components import (
Expand Down
1 change: 1 addition & 0 deletions preswald/static/assets/index-BLLs3pyz.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion preswald/static/assets/index-DfiYElBw.css

This file was deleted.

4 changes: 2 additions & 2 deletions preswald/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="/preswald.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
<script type="module" crossorigin src="/assets/index-GUmyR73X.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DfiYElBw.css">
<script type="module" crossorigin src="/assets/index-Cya02li6.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BLLs3pyz.css">
</head>
<body>
<div id="root"></div>
Expand Down
8 changes: 4 additions & 4 deletions preswald_project/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
data = pd.DataFrame(connections[connection_name])
# Convert Magnitude column to numeric, handling any non-numeric values
data['Magnitude'] = pd.to_numeric(data['Magnitude'], errors='coerce')
filtered_data = data[data['Magnitude'] >= min_magnitude.get('value', min_magnitude)]
filtered_data = data[data['Magnitude'] >=
min_magnitude.get('value', min_magnitude)]

# Summary statistics
text(f"### Total Earthquakes with Magnitude ≥ {min_magnitude.get('value', min_magnitude)}: {len(filtered_data)}")
text(f"### Total Earthquakes with Magnitude ≥ {
min_magnitude.get('value', min_magnitude)}: {len(filtered_data)}")

# Interactive map using Plotly
text("## Earthquake Locations")
Expand All @@ -36,7 +38,6 @@
plotly(fig_map)

# Magnitude distribution
text("## Magnitude Distribution")
fig_hist = px.histogram(
filtered_data,
x="Magnitude",
Expand All @@ -46,7 +47,6 @@
plotly(fig_hist)

# Depth vs. Magnitude scatter plot
text("## Depth vs. Magnitude")
fig_scatter = px.scatter(
filtered_data,
x="Depth",
Expand Down
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ 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...")
Expand All @@ -52,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 @@ -93,7 +95,7 @@ def _copy_assets(self, frontend_dir):
# Setup configuration
setup(
name="preswald",
version="0.1.16",
version="0.1.17",
author="Structured",
author_email="founders@structuredlabs.com",
description="A lightweight data workflow SDK.",
Expand Down

0 comments on commit a93e8a0

Please sign in to comment.