-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
103 lines (79 loc) · 2.67 KB
/
justfile
File metadata and controls
103 lines (79 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# MediaIngredientMech justfile
# Run `just` to see all available commands
# Default recipe - list all commands
default:
@just --list
# Install package and dependencies
install:
pip install -e ".[dev]"
# Generate LinkML dataclasses from schema
gen-schema:
gen-linkml --dir src/mediaingredientmech/datamodel src/mediaingredientmech/schema/mediaingredientmech.yaml
# Validate schema syntax
validate-schema:
linkml-validate --schema src/mediaingredientmech/schema/mediaingredientmech.yaml
# Import data from CultureMech
import-data:
python scripts/import_from_culturemech.py
# Validate all data against schema (both collection and individual files)
validate-all:
python scripts/validate_all.py --mode both
# Launch interactive curation CLI
curate:
python scripts/curate_unmapped.py
# Generate curation progress report
report:
python scripts/generate_report.py
# Generate HTML documentation from schema
gen-docs:
gen-doc --directory docs src/mediaingredientmech/schema/mediaingredientmech.yaml
# Export ingredients to browser JSON
export-browser:
python scripts/browser_export.py
# Generate UMAP visualization
generate-umap:
python scripts/generate_ingredient_umap.py
# Build complete documentation site
build-docs: gen-docs export-browser
@echo "Documentation built in docs/"
@echo "Open docs/index.html to view locally"
# Export collection files to individual YAML records
export-individual:
python scripts/export_individual_records.py
# Aggregate individual files back to collections
aggregate-collections:
python scripts/aggregate_records.py
# Validate individual ingredient files only
validate-individual:
python scripts/validate_all.py --mode individual
# Full workflow: export, validate, aggregate
sync-individual:
just export-individual && just validate-individual && just aggregate-collections
# Create snapshot of current data
snapshot:
@timestamp=$(date +%Y%m%d_%H%M%S) && \
mkdir -p data/snapshots/$$timestamp && \
cp data/curated/*.yaml data/snapshots/$$timestamp/ && \
echo "Snapshot created: data/snapshots/$$timestamp"
# Run tests
test:
pytest tests/
# Run tests with coverage report
test-cov:
pytest tests/ --cov=mediaingredientmech --cov-report=term-missing --cov-report=html
# Format code with black
format:
black src/ tests/ scripts/
# Lint code with ruff
lint:
ruff check src/ tests/ scripts/
# Type check with mypy
typecheck:
mypy src/
# Run all quality checks
check: lint typecheck test
# Clean generated files
clean:
rm -rf build/ dist/ *.egg-info htmlcov/ .pytest_cache/ .coverage
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete