@@ -10,13 +10,15 @@ STABLE_TOOLCHAIN := "1.88.0"
1010 just --list
1111
1212# Quick check including lints and formatting. Run "fix" mode for auto-fixes.
13+ [group (' development' )]
1314@ check mode = " verify":
1415 # Use nightly toolchain for modern format and lint rules.
1516 # Ensure the toolchain is installed and has the necessary components.
1617 rustup component add --toolchain {{ NIGHTLY_TOOLCHAIN}} rustfmt clippy
1718 just _check-{{ mode}}
1819
1920# Verify check, fails if anything is off. Good for CI.
21+ [group (' development' )]
2022@_ check-verify :
2123 # Cargo's wrapper for rustfmt predates workspaces, so uses the "--all" flag instead of "--workspaces".
2224 cargo + {{ NIGHTLY_TOOLCHAIN}} fmt --check --all
@@ -29,26 +31,35 @@ STABLE_TOOLCHAIN := "1.88.0"
2931 RUSTDOCFLAGS=" -D warnings" cargo + {{ STABLE_TOOLCHAIN}} doc --all-features --no-deps
3032
3133# Attempt any auto-fixes for format and lints.
34+ [group (' development' )]
3235@_ check-fix :
3336 # No --check flag to actually apply formatting.
3437 cargo + {{ NIGHTLY_TOOLCHAIN}} fmt --all
3538 # Adding --fix flag to apply suggestions with --allow-dirty.
3639 cargo + {{ NIGHTLY_TOOLCHAIN}} clippy --all-features --all-targets --fix --allow-dirty -- -D warnings
3740
3841# Run the test suite.
42+ [group (' development' )]
3943@ test :
4044 # Run all tests.
4145 # "--all-features" for highest coverage, assuming features are additive so no conflicts.
4246 # "--all-targets" runs `lib` (unit, integration), `bin`, `test`, `bench`, `example` tests, but not doc code.
4347 cargo + {{ STABLE_TOOLCHAIN}} test --all-features --all-targets
4448
4549# Run census.
50+ [group (' development' )]
4651@ run address port = " 8333":
4752 # Simply appending data to the file since each run is a "full" (not incremental) view of the world. A data point.
4853 cargo + {{ STABLE_TOOLCHAIN}} run --release -- run --address {{ address}} --port {{ port}} --format jsonl >> site/ census.jsonl
4954 echo " Census result appended to site/census.jsonl"
5055
56+ # Serve report locally.
57+ [group (' web' )]
58+ @ serve :
59+ python3 -m http.server 8000 --directory {{ justfile_directory ()}} / site
60+
5161# Publish a new version.
62+ [group (' publish' )]
5263@ publish version remote = " upstream": schema
5364 # Requires write privileges on upsream repository.
5465
@@ -74,10 +85,7 @@ STABLE_TOOLCHAIN := "1.88.0"
7485 git tag -a v{{ version}} -m " Release v{{ version}} "
7586 git push {{ remote}} v{{ version}}
7687
77- # Serve report locally.
78- @ serve :
79- python3 -m http.server 8000 --directory {{ justfile_directory ()}} / site
80-
8188# Generate JSON schema documentation.
89+ [group (' publish' )]
8290@ schema :
8391 cargo + {{ STABLE_TOOLCHAIN}} run --quiet --example generate-schema --features schema > {{ justfile_directory ()}} / docs/ census.schema.json
0 commit comments