Template Module (stx.template)
Project scaffolding and code snippet templates for quick starts.
Project Templates
# Clone a project template
scitex template clone research my_project
scitex template clone pip_project my_package
scitex template clone paper my_paper
Template |
Description |
|---|---|
|
Full scientific workflow (scripts, data, docs, config) |
|
Essential modules only |
|
Distributable Python package for PyPI |
|
Reproducible containerized environment |
|
Academic paper with LaTeX/BibTeX structure |
Git Strategies
Strategy |
Behavior |
|---|---|
|
Fresh git repo, isolated from template |
|
Use parent repo if available |
|
Preserve template’s git history |
|
No git initialization |
Code Templates
# List available code templates
scitex template code list
# Get a template
scitex template code session # Full @stx.session script
scitex template code session-minimal # Lightweight session
scitex template code session-plot # Figure-focused session
scitex template code session-stats # Statistics-focused session
scitex template code io # I/O operations
scitex template code plt # Plotting patterns
scitex template code stats # Statistical analysis
scitex template code scholar # Literature management
Python API
from scitex.template import clone_template, get_code_template
# Clone project
clone_template("research", "my_experiment", git_strategy="child")
# Get code snippet
code = get_code_template("session", filepath="analyze.py")
API Reference
See scitex.template API Reference for the auto-generated Python API.