| name | workspace-hub-compliance |
| version | 1.0.0 |
| category | archive |
| description | Systematic verification checklist for ensuring repositories comply with workspace-hub standards covering UV, Plotly, file organization, and modern Python practices. |
Workspace-Hub Standards Compliance Skill
Version: 1.0.0
Created: 2026-01-08
Category: Standards, Compliance, Code Quality
Overview
This skill provides a systematic verification checklist for ensuring repositories comply with workspace-hub standards. It covers UV package management, Plotly visualization requirements, file organization standards, and modern Python development practices.
When to Use
Use this skill when:
- Setting up new repositories in workspace-hub
- Reviewing existing repositories for standards violations
- Modernizing tech stacks to workspace-hub requirements
- Preparing repositories for compliance propagation
- Auditing codebase for deprecated tools and practices
- Implementing best practices across multiple repositories
Skill Components
1. UV Package Manager Compliance
Standard: All Python projects MUST use UV package manager (not Conda, Poetry, or pip)
Verification Checklist:
Compliance Commands:
uv venv
source .venv/bin/activate
.venv\Scripts\activate
uv pip install -e .
conda create -n myenv python=3.11
conda activate myenv
poetry install
poetry shell
python -m venv venv
pip install -r requirements.txt
Migration Steps:
- Install UV:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Create
pyproject.toml from existing requirements.txt or pyproject.toml (Poetry)
- Remove Conda/Poetry configuration files
- Update README with UV instructions
- Test installation:
uv pip install -e .
pyproject.toml Template:
[project]
name = "project-name"
version = "1.0.0"
description = "Brief description"
requires-python = ">=3.11"
dependencies = [
"pandas>=2.0.0",
"numpy>=1.24.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"ruff>=0.1.0",
]
[project.scripts]
main-command = "package.module:main"
2. Plotly Interactive Visualization Compliance
Standard: ALL visualizations MUST be interactive using Plotly (no static matplotlib/seaborn)
Verification Checklist:
Compliance Commands:
import plotly.express as px
import pandas as pd
df = pd.read_csv('../data/processed/results.csv')
fig = px.scatter(df, x='time', y='value', title='Interactive Plot')
fig.write_html('../reports/analysis.html')
import matplotlib.pyplot as plt
plt.scatter(df['time'], df['value'])
plt.savefig('plot.png')
import seaborn as sns
sns.scatterplot(data=df, x='time', y='value')
plt.savefig('plot.png')
Migration Steps:
- Search codebase for
matplotlib, seaborn, pyplot imports
- Replace with
plotly.express or plotly.graph_objects
- Convert static plots to interactive equivalents
- Update dependencies: Remove matplotlib/seaborn, add Plotly/Kaleido
- Change output from
.png/.jpg to .html
- Test all visualizations in browser
Plotly Equivalents:
| Matplotlib/Seaborn | Plotly Equivalent |
|---|
plt.plot() | px.line() |
plt.scatter() | px.scatter() |
plt.bar() | px.bar() |
plt.hist() | px.histogram() |
sns.heatmap() | px.imshow() or go.Heatmap() |
plt.pie() | px.pie() |
sns.boxplot() | px.box() |
sns.violinplot() | px.violin() |
3. File Organization Standards Compliance
Standard: Consistent file organization across all repositories
Verification Checklist:
Standard Directory Structure:
repository/
├── src/ # Source code
│ └── modules/
│ ├── module_1/
│ └── module_2/
├── tests/ # Test files
│ ├── unit/
│ └── integration/
├── docs/ # Documentation
├── config/ # Configuration files
├── scripts/ # Utility scripts
├── data/ # Data files
│ ├── raw/ # Raw input data
│ ├── processed/ # Processed data
│ └── results/ # Output results
├── reports/ # Generated reports (HTML, PDF)
└── pyproject.toml # Project configuration
Migration Steps:
- Create standard directories if missing:
mkdir -p {src,tests,docs,config,scripts,data/{raw,processed,results},reports}
- Move misplaced files to correct directories
- Update import paths in code
- Update file paths in scripts and documentation
- Add
.gitignore entries for generated files in /reports/ and /data/results/
4. CSV Data Import Standards Compliance
Standard: CSV data MUST use relative paths from report location
Verification Checklist:
Compliance Commands:
import pandas as pd
df = pd.read_csv('../data/processed/results.csv')
from pathlib import Path
def get_data_path(filename, data_type='processed'):
"""Get data file path relative to project root."""
project_root = Path(__file__).parent.parent.parent
return project_root / 'data' / data_type / filename
df = pd.read_csv(get_data_path('results.csv'))
df = pd.read_csv('/mnt/github/workspace-hub/repo/data/results.csv')
df = pd.read_csv('C:/Users/user/Documents/repo/data/results.csv')
Migration Steps:
- Search codebase for absolute paths:
grep -r "/mnt/" . or grep -r "C:\\" .
- Replace with relative paths or path utilities
- Test on different platforms (Linux, macOS, Windows)
- Document data directory structure in README
5. Modern Python Standards Compliance
Standard: Python 3.11+ with modern type hints and current dependency versions
Verification Checklist:
Compliance Dependencies:
[project]
requires-python = ">=3.11"
dependencies = [
"pandas>=2.0.0",
"numpy>=1.24.0",
"pypdf>=3.0.0",
"plotly>=5.14.0",
"python-dotenv>=1.0.0",
]
[project.optional-dependencies]
dev = [
"ruff>=0.1.0",
"mypy>=1.5.0",
"pytest>=7.4.0",
]
Migration Steps:
- Update
requires-python to >=3.11
- Update all dependencies to current major versions
- Replace deprecated packages (PyPDF2 → pypdf, etc.)
- Replace Black + isort + flake8 with Ruff
- Add type hints to functions
- Run mypy to validate types
6. Module Organization Standards Compliance
Standard: Modular architecture with clear module boundaries and CLI commands
Verification Checklist:
Compliance Structure:
src/
└── modules/
├── module_1/
│ ├── __init__.py
│ ├── core.py
│ ├── utils.py
│ └── config.py
├── module_2/
│ ├── __init__.py
│ └── processor.py
└── shared/
├── __init__.py
└── helpers.py
CLI Configuration:
[project.scripts]
module1-command = "package.modules.module_1:main"
module2-command = "package.modules.module_2:main"
Migration Steps:
- Identify logical module boundaries based on functionality
- Create module directories under
/src/modules/
- Move related files into appropriate modules
- Update imports to reflect new structure
- Define CLI entry points for each module
- Document module architecture in decisions.md
Compliance Verification Process
Step 1: Run Automated Checks
UV Compliance:
find . -name "conda.yaml" -o -name "environment.yml" -o -name "poetry.lock"
grep -q "requires-python" pyproject.toml && echo "✓ UV compliant" || echo "✗ Missing UV config"
Plotly Compliance:
grep -r "import matplotlib" src/ && echo "✗ Matplotlib found" || echo "✓ No matplotlib"
grep -r "import seaborn" src/ && echo "✗ Seaborn found" || echo "✓ No seaborn"
grep -r "import plotly" src/ && echo "✓ Plotly found" || echo "✗ Missing Plotly"
File Organization:
ls *.html *.csv *.png 2>/dev/null && echo "✗ Files in root" || echo "✓ Clean root"
for dir in src tests docs config scripts data reports; do
[ -d "$dir" ] && echo "✓ $dir exists" || echo "✗ $dir missing"
done
Step 2: Manual Review
Checklist:
Step 3: Test Compliance
UV Installation Test:
rm -rf .venv
uv venv
source .venv/bin/activate
uv pip install -e .
python -c "import [package]"
Visualization Test:
python scripts/generate_report.py
open reports/report.html
xdg-open reports/report.html
start reports/report.html
Compliance Templates
UV Migration Template
#!/bin/bash
echo "🔄 Migrating to UV package manager..."
if ! command -v uv &> /dev/null; then
echo "Installing UV..."
curl -LsSf https://astral.sh/uv/install.sh | sh
fi
if [ -f "requirements.txt" ]; then
echo "Creating pyproject.toml from requirements.txt..."
fi
echo "Removing Conda/Poetry files..."
rm -f conda.yaml environment.yml poetry.lock
echo "Creating UV environment..."
uv venv
source .venv/bin/activate
echo "Installing dependencies with UV..."
uv pip install -e .
echo "Update README with UV instructions (manual step)"
echo "✅ UV migration complete!"
Plotly Migration Template
import re
from pathlib import Path
def convert_matplotlib_to_plotly(file_path):
"""Convert matplotlib code to Plotly equivalents."""
conversions = {
r'import matplotlib\.pyplot as plt': 'import plotly.express as px',
r'plt\.scatter\((.*?)\)': r'px.scatter(df, x=\1)',
r'plt\.plot\((.*?)\)': r'px.line(df, x=\1)',
r'plt\.bar\((.*?)\)': r'px.bar(df, x=\1)',
r'plt\.savefig\(["\'](.+?)\.png["\']\)': r'fig.write_html("\1.html")',
}
content = file_path.read_text()
for old_pattern, new_pattern in conversions.items():
content = re.sub(old_pattern, new_pattern, content)
file_path.write_text(content)
print(f"✅ Converted: {file_path}")
for py_file in Path('src').rglob('*.py'):
if 'matplotlib' in py_file.read_text():
convert_matplotlib_to_plotly(py_file)
File Organization Template
#!/bin/bash
echo "📁 Organizing files to workspace-hub standards..."
mkdir -p src/{modules,utils} tests/{unit,integration} docs config scripts
mkdir -p data/{raw,processed,results} reports
echo "Moving files to correct directories..."
find . -maxdepth 1 -name "*.py" ! -name "setup.py" -exec mv {} src/ \;
find . -name "test_*.py" -exec mv {} tests/unit/ \;
find . -maxdepth 1 -name "*.csv" -exec mv {} data/raw/ \;
find . -maxdepth 1 -name "*.html" -exec mv {} reports/ \;
cat >> .gitignore <<EOF
# Generated files
reports/*.html
data/results/
*.log
EOF
echo "✅ File organization complete!"
echo "⚠️ Update import paths in code manually"
Compliance Enforcement
Pre-Commit Hook
#!/bin/bash
echo "🔍 Checking workspace-hub standards compliance..."
if [ -f "conda.yaml" ] || [ -f "environment.yml" ]; then
echo "❌ ERROR: Conda configuration found. Use UV package manager."
exit 1
fi
if grep -r "import matplotlib" src/ 2>/dev/null; then
echo "❌ ERROR: Matplotlib imports found. Use Plotly for interactive visualizations."
exit 1
fi
if ls *.html 2>/dev/null || ls *.csv 2>/dev/null; then
echo "❌ ERROR: Files in root directory. Move to /reports/ or /data/"
exit 1
fi
if grep -r "/mnt/github" src/ 2>/dev/null || grep -r "C:\\\\" src/ 2>/dev/null; then
echo "❌ ERROR: Absolute paths found. Use relative paths."
exit 1
fi
echo "✅ Compliance checks passed!"
CI/CD Validation
name: Workspace-Hub Compliance
on: [push, pull_request]
jobs:
compliance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check UV Configuration
run: |
test -f pyproject.toml || (echo "Missing pyproject.toml" && exit 1)
grep -q "requires-python" pyproject.toml || (echo "Missing Python version" && exit 1)
- name: Check for Conda/Poetry
run: |
! test -f conda.yaml && ! test -f environment.yml && ! test -f poetry.lock
- name: Check Plotly Usage
run: |
! grep -r "import matplotlib" src/
! grep -r "import seaborn" src/
grep -r "import plotly" src/ || (echo "Missing Plotly" && exit 1)
- name: Check File Organization
run: |
test -d src && test -d tests && test -d docs && test -d data && test -d reports
! ls *.html *.csv 2>/dev/null
Best Practices
Do's
✅ Use UV for all Python projects - Faster, more reliable than Conda/Poetry
✅ Interactive visualizations only - Plotly for all charts and graphs
✅ Relative paths for data - Portable across environments
✅ Organized directory structure - Files in appropriate subdirectories
✅ Modern Python (3.11+) - Latest features and performance
✅ Current dependency versions - Major versions (Pandas 2.0+, etc.)
Don'ts
❌ Don't use Conda or Poetry - UV is the workspace-hub standard
❌ Don't use matplotlib/seaborn - Static plots violate standards
❌ Don't use absolute paths - Breaks portability
❌ Don't save to root directory - Use /reports/, /data/, etc.
❌ Don't use outdated dependencies - Keep major versions current
❌ Don't use deprecated packages - Replace PyPDF2 with pypdf, etc.
Related Skills
- Product Documentation Modernization - Documenting compliance requirements
- Technology Stack Modernization - Updating to compliant tech stack
- File Organization - Implementing standard directory structure
- Quantification & Metrics - Measuring compliance impact
References
- Workspace-Hub Standards:
/mnt/github/workspace-hub/docs/modules/standards/
- UV Package Manager: https://github.com/astral-sh/uv
- Plotly Documentation: https://plotly.com/python/
- HTML Reporting Standards:
docs/modules/standards/HTML_REPORTING_STANDARDS.md
- File Organization Standards:
docs/modules/standards/FILE_ORGANIZATION_STANDARDS.md
Version History
- 1.0.0 (2026-01-08): Initial skill creation based on aceengineer-admin tech-stack.md modernization work