rigetti-pyo3 0.0.1

Utilities for creating a Python wrapper for a Rust library.
Documentation
[env]
    CARGO_HACK_COMMON_FLAGS = "--feature-powerset --optional-deps --exclude-features extension-module"

[tasks.clean]
    clear = true
    script = """
    rm -f *.profraw
    cargo clean
    """

[tasks.install-coverage-tools]
    install_crate = { rustup_component_name = "llvm-tools-preview" }

[tasks.install-cargo-hack]
    install_crate = { crate_name = "cargo-hack", binary = "cargo-hack", test_arg = ["hack", "--help"] }

[tasks.check]
    clear = true
    dependencies = ["install-cargo-hack"]
    script = "cargo hack check $CARGO_HACK_COMMON_FLAGS --all-targets"

[tasks.clippy]
    clear = true
    dependencies = ["install-clippy-any", "install-cargo-hack"]
    script = "cargo hack clippy $CARGO_HACK_COMMON_FLAGS --all-targets"

[tasks.coverage-tests]
    dependencies = ["install-coverage-tools"]
    script = "cargo test"
[tasks.coverage-tests.env]
    RUSTFLAGS = "-Cinstrument-coverage"
    LLVM_PROFILE_FILE = ".coverage/coverage-%p-%m.profraw"

[tasks.install-grcov]
    dependencies = ["install-coverage-tools"]
    install_crate = { crate_name = "grcov", binary = "grcov", test_arg = "--help" }

[tasks.coverage-base]
    dependencies = ["install-grcov", "coverage-tests"]
    command = "grcov"
    args = [
        ".",
        "-s", ".",
        "--keep-only", "**/src/**", # Ignore files not in a src/ folder
        "-p", "src",
        "--binary-path", "./target/debug/",
        "--ignore", "./tests",
        "--ignore", "/*", # Ignore dependencies, whose source are in absolute path $HOME/.cargo/...
        "-t", "${COVERAGE_OUTPUT_TYPE}",
        "--branch",
        "--llvm",
        "--ignore-not-existing",
        "-o", "${COVERAGE_OUTPUT_FILE}"
    ]

[tasks.coverage-html]
    run_task = "coverage-base"
[tasks.coverage-html.env]
    COVERAGE_OUTPUT_TYPE = "html"
    COVERAGE_OUTPUT_FILE = "./target/debug/coverage/"

[tasks.view-coverage]
    linux_alias = "view-coverage-linux"
    mac_alias = "view-coverage-macos"
    windows_alias = "view-coverage-windows"

[tasks.view-coverage-linux]
    dependencies = ["coverage-html"]
    command = "xdg-open"
    args = ["./target/debug/coverage/index.html"]

[tasks.view-coverage-macos]
    dependencies = ["coverage-html"]
    command = "open"
    args = ["./target/debug/coverage/index.html"]

[tasks.view-coverage-windows]
    dependencies = ["coverage-html"]
    command = "cmd.exe"
    args = ["/c", "start", "./target/debug/coverage/index.html"]

[tasks.deadlinks]
    install_crate = "cargo-deadlinks"
    command = "cargo"
    args = ["deadlinks", "--check-http", "--check-intra-doc-links"]

[tasks.deny]
    dependencies = ["merge-deny-config"]
    install_crate = "cargo-deny"
    command = "cargo"
    args = ["deny", "check", "-c", "${CARGO_MAKE_WORKING_DIRECTORY}/deny.toml", "all"]

[tasks.deny-advisories]
    dependencies = ["merge-deny-config"]
    install_crate = "cargo-deny"
    command = "cargo"
    args = ["deny", "check", "-c", "${CARGO_MAKE_WORKING_DIRECTORY}/deny.toml", "advisories"]

[tasks.deny-ban]
    dependencies = ["merge-deny-config"]
    install_crate = "cargo-deny"
    command = "cargo"
    args = ["deny", "check", "-c", "${CARGO_MAKE_WORKING_DIRECTORY}/deny.toml", "ban"]

[tasks.deny-bans]
    dependencies = ["merge-deny-config"]
    install_crate = "cargo-deny"
    command = "cargo"
    args = ["deny", "check", "-c", "${CARGO_MAKE_WORKING_DIRECTORY}/deny.toml", "bans"]

[tasks.deny-license]
    dependencies = ["merge-deny-config"]
    install_crate = "cargo-deny"
    command = "cargo"
    args = ["deny", "check", "-c", "${CARGO_MAKE_WORKING_DIRECTORY}/deny.toml", "license"]

[tasks.deny-licenses]
    dependencies = ["merge-deny-config"]
    install_crate = "cargo-deny"
    command = "cargo"
    args = ["deny", "check", "-c", "${CARGO_MAKE_WORKING_DIRECTORY}/deny.toml", "licenses"]

[tasks.deny-sources]
    dependencies = ["merge-deny-config"]
    install_crate = "cargo-deny"
    command = "cargo"
    args = ["deny", "check", "-c", "${CARGO_MAKE_WORKING_DIRECTORY}/deny.toml", "sources"]

[tasks.geiger]
    install_crate = "cargo-geiger"
    command = "cargo"
    args = ["geiger"]

[tasks.license]
    install_crate = "cargo-license"
    command = "cargo"
    args = ["license", "--all-features", "--avoid-dev-deps"]

[tasks.msrv]
    install_crate = "cargo-msrv"
    command = "cargo"
    args = ["msrv"]

[tasks.msrv-verify]
    install_crate = "cargo-msrv"
    command = "cargo"
    args = ["msrv", "verify"]

[tasks.outdated]
    install_crate = "cargo-outdated"
    command = "cargo"
    args = ["outdated"]

[tasks.test]
    clear = true
    dependencies = ["install-cargo-hack"]
    script = "cargo hack test $CARGO_HACK_COMMON_FLAGS"

[tasks.test-nextest]
    dependencies = ["install-cargo-hack"]
    install_crate = { crate_name = "cargo-nextest", binary = "cargo-nextest", test_arg = "--help" }
    script = "cargo hack nextest run $CARGO_HACK_COMMON_FLAGS"

[tasks.check-all]
    dependencies = ["deny", "check", "test-nextest", "clippy", "deadlinks", "outdated", "msrv-verify"]