[workspace]
authors = ["Sam Vente <savente93@proton.me>"]
channels = ["conda-forge"]
name = "snakedown"
platforms = ["win-64", "linux-64"]
version = "0.1.0"
[tasks]
test = "cargo test --all"
cov-ci = "cargo llvm-cov --locked --all-features --lcov --output-path lcov.info"
cov-open = "cargo llvm-cov --locked --all-features --open"
[dependencies]
rust = ">=1.92.0,<1.93"
cargo-llvm-cov = ">=0.6.23,<0.7"
[feature.docs.dependencies]
mdbook = ">=0.5.2,<0.6"
[feature.docs.tasks]
cargo-doc = "cargo doc --no-deps --all-features --workspace"
cargo-doc-open = "cargo doc --no-deps --all-features --workspace --open"
book-build = "mdbook build docs"
book-serve = "mdbook serve docs"
book-test = "mdbook test docs"
doc = { depends-on = ["cargo-doc", "book-build", "book-test"] }
doc-open = { depends-on = ["cargo-doc-open", "book-serve"] }
[feature.zola.dependencies]
zola = ">=0.22.0,<0.23"
[feature.zola.tasks]
clean-zola-output = "rm -rf tests/zola_test_site/content/api"
zola-serve-test-site = "zola --root tests/zola_test_site serve"
zola-serve-test-build = "zola --root tests/zola_test_site build"
snakedown-build-zola = "cargo r -- -p tests/test_pkg -s tests/zola_test_site -a api --notebooks-content-path user-guide -n tests/test_notebooks --ssg zola -e tests/test_pkg/excluded_file.py -e tests/test_pkg/excluded_module/ -e miss_spelled_ref.py -vvv"
flamegraph = "cargo flamegraph --profile bench -- -c benchmark-config.toml"
bench = "cargo bench --profile bench"
bench-baseline = "cargo bench --profile bench -- --save-baseline base"
bench-compare = "cargo bench --profile bench -- --baseline base"
zola-build = { depends-on = [
"clean-zola-output",
"snakedown-build-zola",
"zola-serve-test-build",
] }
zb = { depends-on = ["zola-build"] }
z = { depends-on = ["zola"] }
zola = { depends-on = [
"clean-zola-output",
"snakedown-build-zola",
"zola-serve-test-site",
] }
[feature.dev.dependencies]
gh = ">=2.83.2,<3"
taplo = ">=0.10.0,<0.11"
typos = ">=1.42.0,<2"
perf = ">=1.6.0,<2"
[feature.dev.tasks]
typos-check = "typos ."
clippy-check = "cargo clippy --all --all-targets --all-features -- --deny warnings"
rust-fmt-check = "cargo fmt --all --check"
taplo-check = "taplo fmt --check **/*.toml"
lint = { depends-on = [
"typos-check",
"clippy-check",
"rust-fmt-check",
"taplo-check",
] }
taplo-fix = "taplo fmt **/*.toml"
rust-fmt-fix = "cargo fmt --all"
typos-fix = "typos -w ."
clippy-fix = "cargo clippy --fix --allow-dirty"
lint-fix = { depends-on = [
"rust-fmt-fix",
"typos-fix",
"taplo-fix",
"clippy-fix",
] }
gh-check-existing-pr = "gh pr list --head \"$(git rev-parse --abbrev-ref HEAD)\" --json author --jq \". == []\" | grep -q \"true\""
git-check-clean-worktree = "git diff-index --quiet HEAD --"
gh-create-pr = "gh pr create --web --fill-first"
pr = { depends-on = [
"gh-check-existing-pr",
"lint-fix",
"git-check-clean-worktree",
"gh-create-pr",
] }
[environments]
default = { features = ["default", "dev", "zola", "docs"] }
test = { features = ["default", "zola"] }
docs = { features = ["default", "docs"] }