uvnote Integration Test Report

Comprehensive test of uvnote functionality with enhanced features

This is a comprehensive test of uvnote functionality with frontmatter configuration.

Data Generation

▼ code ▼ output ▶ uv-logs | Cell: generate_data | deps: numpy, pandas | 1.06s | Raw
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import numpy as np
import pandas as pd

# Set seed for reproducibility
np.random.seed(42)

# Generate sample data
n_points = 100
data = pd.DataFrame({
    'x': np.random.normal(0, 1, n_points),
    'y': np.random.normal(0, 1, n_points),
    'category': np.random.choice(['A', 'B', 'C'], n_points)
})

print(f"Generated {len(data)} data points")
print("\nFirst 5 rows:")
print(data.head())

print(f"\nData types:")
print(data.dtypes)
Generated 100 data points

First 5 rows:
          x         y category
0  0.496714 -1.415371        B
1 -0.138264 -0.420645        B
2  0.647689 -0.342715        A
3  1.523030 -0.802277        A
4 -0.234153 -0.161286        A

Data types:
x           float64
y           float64
category     object
dtype: object
▶ UV Install Logs

Statistical Analysis

▼ code ▼ output ▶ uv-logs | Cell: stats | deps: numpy, pandas | 1.07s | Raw
import numpy as np
import pandas as pd

# Recreate the same data with same seed
np.random.seed(42)
n_points = 100
data = pd.DataFrame({
    'x': np.random.normal(0, 1, n_points),
    'y': np.random.normal(0, 1, n_points),
    'category': np.random.choice(['A', 'B', 'C'], n_points)
})

# Calculate basic statistics
stats = data.describe()
print("Descriptive Statistics:")
print(stats)

# Category counts
print("\nCategory distribution:")
print(data['category'].value_counts())

# Correlation
correlation = data[['x', 'y']].corr()
print(f"\nCorrelation between x and y: {correlation.iloc[0,1]:.3f}")
Descriptive Statistics:
                x           y
count  100.000000  100.000000
mean    -0.103847    0.022305
std      0.908168    0.953669
min     -2.619745   -1.918771
25%     -0.600906   -0.805661
50%     -0.126956    0.084107
75%      0.405952    0.538170
max      1.852278    2.720169

Category distribution:
category
B    37
A    33
C    30
Name: count, dtype: int64

Correlation between x and y: -0.136
▶ UV Install Logs

Visualization

▼ code ▼ output ▶ uv-logs | Cell: plot | deps: matplotlib, pandas, numpy | 6.10s | Raw
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np

# Recreate the same data with same seed
np.random.seed(42)
n_points = 100
data = pd.DataFrame({
    'x': np.random.normal(0, 1, n_points),
    'y': np.random.normal(0, 1, n_points),
    'category': np.random.choice(['A', 'B', 'C'], n_points)
})

# Create scatter plot
plt.figure(figsize=(10, 6))

# Subplot 1: Scatter plot by category
plt.subplot(1, 2, 1)
for cat in data['category'].unique():
    cat_data = data[data['category'] == cat]
    plt.scatter(cat_data['x'], cat_data['y'], label=f'Category {cat}', alpha=0.7)

plt.xlabel('X values')
plt.ylabel('Y values') 
plt.title('Scatter Plot by Category')
plt.legend()
plt.grid(True, alpha=0.3)

# Subplot 2: Histogram
plt.subplot(1, 2, 2)
plt.hist(data['x'], bins=15, alpha=0.7, label='X', color='blue')
plt.hist(data['y'], bins=15, alpha=0.7, label='Y', color='orange')
plt.xlabel('Value')
plt.ylabel('Frequency')
plt.title('Distribution of X and Y')
plt.legend()
plt.grid(True, alpha=0.3)

plt.tight_layout()
plt.savefig('scatter_plot.png', dpi=150, bbox_inches='tight')
plt.close()

# Create individual histogram
plt.figure(figsize=(8, 6))
plt.hist(data['x'], bins=20, alpha=0.7, color='skyblue', edgecolor='black')
plt.xlabel('X values')
plt.ylabel('Frequency')
plt.title('Distribution of X Values')
plt.grid(True, alpha=0.3)
plt.savefig('histogram.png', dpi=150, bbox_inches='tight')
plt.close()

print("Plots saved successfully!")
print("- scatter_plot.png: Combined scatter plot and distribution")
print("- histogram.png: X value distribution")
Plots saved successfully!
- scatter_plot.png: Combined scatter plot and distribution
- histogram.png: X value distribution
▶ UV Install Logs

File Operations

▼ code ▼ output ▶ uv-logs | Cell: save_data | deps: pandas, numpy | 1.07s | Raw
import pandas as pd
import numpy as np

# Recreate the same data with same seed
np.random.seed(42)
n_points = 100
data = pd.DataFrame({
    'x': np.random.normal(0, 1, n_points),
    'y': np.random.normal(0, 1, n_points),
    'category': np.random.choice(['A', 'B', 'C'], n_points)
})

# Save data to CSV
data.to_csv('data.csv', index=False)
print("Data saved to data.csv")

# Create summary file
with open('summary.txt', 'w') as f:
    f.write("Data Summary Report\n")
    f.write("==================\n\n")
    f.write(f"Total data points: {len(data)}\n")
    f.write(f"Columns: {list(data.columns)}\n")
    f.write(f"X range: {data['x'].min():.3f} to {data['x'].max():.3f}\n")
    f.write(f"Y range: {data['y'].min():.3f} to {data['y'].max():.3f}\n")
    f.write(f"Categories: {sorted(data['category'].unique())}\n")

print("Summary saved to summary.txt")
Data saved to data.csv
Summary saved to summary.txt
▶ UV Install Logs

Artifacts:

summary.txt data.csv
x y category
0.4967141530112327 -1.4153707420504142 B
-0.13826430117118466 -0.42064532276535904 B
0.6476885381006925 -0.3427145165267695 A
1.5230298564080254 -0.8022772692216189 A
-0.23415337472333597 -0.16128571166600914 A
-0.23413695694918055 0.4040508568145384 C
1.5792128155073915 1.8861859012105302 B
0.7674347291529088 0.17457781283183896 C
-0.4694743859349521 0.25755039072276437 A
0.5425600435859647 -0.07444591576616721 B
-0.46341769281246226 -1.9187712152990415 C
-0.46572975357025687 -0.026513875449216878 B
0.24196227156603412 0.06023020994102644 C
-1.913280244657798 2.463242112485286 B
-1.7249178325130328 -0.19236096478112252 A
-0.5622875292409727 0.30154734233361247 A
-1.0128311203344238 -0.03471176970524331 B
0.3142473325952739 -1.168678037619532 C
-0.9080240755212109 1.1428228145150205 A
-1.4123037013352915 0.7519330326867741 A
1.465648768921554 0.7910319470430469 A
-0.22577630048653566 -0.9093874547947389 B
0.06752820468792384 1.4027943109360992 B
-1.4247481862134568 -1.4018510627922809 C
-0.5443827245251827 0.5868570938002703 C
0.11092258970986608 2.1904556258099785 C
-1.1509935774223028 -0.9905363251306883 B
0.37569801834567196 -0.5662977296027719 B
-0.600638689918805 0.09965136508764122 C
-0.2916937497932768 -0.5034756541161992 C
-0.6017066122293969 -1.5506634310661327 B
1.8522781845089378 0.06856297480602733 C
-0.013497224737933921 -1.0623037137261049 A
-1.0577109289559004 0.4735924306351816 B
0.822544912103189 -0.9194242342338032 C
-1.2208436499710222 1.5499344050175394 B
0.2088635950047554 -0.7832532923362371 A
-1.9596701238797756 -0.3220615162056756 B
-1.3281860488984305 0.8135172173696698 B
0.19686123586912352 -1.2308643164339552 B
0.7384665799954104 0.22745993460412942 B
0.1713682811899705 1.307142754282428 A
-0.11564828238824053 -1.6074832345612275 B
-0.3011036955892888 0.1846338585323042 B
-1.4785219903674274 0.25988279424842353 C
-0.7198442083947086 0.7818228717773104 B
-0.4606387709597875 -1.236950710878082 C
1.0571222262189157 -1.3204566130842763 A
0.3436182895684614 0.5219415656168976 A
-1.763040155362734 0.29698467323318606 A
0.324083969394795 0.25049285034587654 A
-0.38508228041631654 0.3464482094969757 C
-0.6769220003059587 -0.6800247215784908 B
0.6116762888408679 0.23225369716100355 A
1.030999522495951 0.29307247329868125 B
0.9312801191161986 -0.7143514180263678 C
-0.8392175232226385 1.8657745111447566 C
-0.3092123758512146 0.4738329209117875 C
0.33126343140356396 -1.1913034972026486 A
0.9755451271223592 0.6565536086338297 B
-0.47917423784528995 -0.9746816702273214 B
-0.18565897666381712 0.787084603742452 B
-1.1063349740060282 1.158595579007404 C
-1.1962066240806708 -0.8206823183517105 A
0.812525822394198 0.9633761292443218 C
1.356240028570823 0.4127809269364983 C
-0.07201012158033385 0.82206015999449 B
1.0035328978920242 1.8967929826539474 C
0.36163602504763415 -0.2453881160028705 B
-0.6451197546051243 -0.7537361643574896 A
0.36139560550841393 -0.8895144296255233 B
1.5380365664659692 -0.8158102849654383 A
-0.03582603910995154 -0.0771017094141042 B
1.5646436558140062 0.3411519748166439 C
-2.6197451040897444 0.27669079933001905 C
0.8219025043752238 0.8271832490360238 A
0.08704706823817122 0.01300189187790702 A
-0.29900735046586746 1.4535340771573169 A
0.0917607765355023 -0.2646568332379561 B
-1.9875689146008928 2.720169166589619 B
-0.21967188783751193 0.6256673477650062 A
0.3571125715117464 -0.8571575564162826 C
1.477894044741516 -1.0708924980611123 B
-0.5182702182736474 0.4824724152431853 B
-0.8084936028931876 -0.2234627853258509 B
-0.5017570435845365 0.714000494092092 A
0.9154021177020741 0.47323762457354485 A
0.32875110965968446 -0.07282891265687277 A
-0.5297602037670388 -0.846793718068405 A
0.5132674331133561 -1.5148472246858646 A
0.09707754934804039 -0.4465149520670211 C
0.9686449905328892 0.8563987943234723 C
-0.7020530938773524 0.21409374413020396 A
-0.3276621465977682 -1.245738778711988 B
-0.39210815313215763 0.173180925851182 A
-1.4635149481321186 0.3853173797288368 C
0.29612027706457605 -0.883857436201133 C
0.26105527217988933 0.1537251059455279 B
0.00511345664246089 0.058208718445999896 C
-0.23458713337514692 -1.142970297830623 A

Results

The analysis generated:

All outputs are cached and artifacts are preserved in the generated HTML.

Dependent Cell Example

▼ code ▼ output ▶ uv-logs | Cell: use_saved_data | deps: pandas | 1.05s | Raw
1 2 3 4 5 6 7 8 9 10
import os
import pandas as pd

# Discover the upstream artifact directory from env
data_dir = os.environ.get('UVNOTE_INPUT_SAVE_DATA', '.')
csv_path = os.path.join(data_dir, 'data.csv')

df = pd.read_csv(csv_path)
print(f"Dependent cell read {len(df)} rows from save_data/data.csv")
print(f"x mean: {df['x'].mean():.3f}, y mean: {df['y'].mean():.3f}")
Dependent cell read 100 rows from save_data/data.csv
x mean: -0.104, y mean: 0.022
▶ UV Install Logs