Set up

Working on the package needs Julia 1.10 or later and git. This page sets up the three environments, the package, its tests and its documentation, and says how to run the tests, format the code and build the documentation.

Clone and instantiate

git clone https://github.com/dionysos-dev/PathCompleteCertificates.jl.git
cd PathCompleteCertificates.jl
julia --project -e 'using Pkg; Pkg.instantiate()'
julia --project=test -e 'using Pkg; Pkg.instantiate()'
julia --project=docs -e 'using Pkg; Pkg.instantiate()'

Manifest.toml is not tracked, so each clone resolves for itself. When Pkg.test() reports a dependency missing from the manifest, delete the manifest of the environment that failed, root, test/ or docs/, and resolve again.

The test/ and docs/ environments reach the package through a relative [sources] entry. Julia 1.11 and later read it, so instantiate is enough. Julia 1.10 ignores it: there, develop the package into both environments before instantiating them, as the docs workflow does:

julia --project=test -e 'using Pkg; Pkg.develop(path = ".")'
julia --project=docs -e 'using Pkg; Pkg.develop(path = ".")'

Run the tests

Every test file is standalone. Run the narrowest scope that can fail, and the whole suite before opening a pull request.

julia --project=test test/graphs/path_completeness.jl                # one file
julia --project -e 'using Pkg; Pkg.test(; test_args = ["--fast"])'   # skips the :slow suites
julia --project -e 'using Pkg; Pkg.test()'                           # everything

The :slow suites are the expensive ones, most of which solve programs. Most regressions surface there, so a change is not tested until they pass. A new test file goes in TEST_FILES in test/runtests.jl, tagged :slow if it takes long. The summary the suite prints, slowest first, shows which do.

While iterating, keep one Julia session open with Revise and include the file you are working on: a cold start costs about half a minute.

Format

Required before every commit: CI fails on any diff. The rules are in .JuliaFormatter.toml.

julia -e 'using JuliaFormatter; format(".")'

Build the documentation

julia --project=docs docs/make.jl                          # everything, a few minutes
PCC_SKIP_LITERATE=true julia --project=docs docs/make.jl   # skips the tutorials

The build executes every code block of the manual and every tutorial under docs/src/examples/. With the tutorials skipped, a tutorial page not already generated is dropped from the navigation, so run a full build before opening a pull request.

Docstrings are checked twice. test/docstrings.jl fails on any name reachable as PathCompleteCertificates.name without one, exported or not. And the build fails on a docstring that no @autodocs block under docs/src/reference/ picks up, so a new file in src/ needs a Pages entry there.

Continuous integration

WorkflowGates
ci.ymlthe tests on Julia 1.10 and the current release
format_check.ymlthe formatter
aqua.ymltype piracy, method ambiguities, stale dependencies
documentation.ymlthe docs build and its deployment
blob-size-guard.ymlno file over 5 MB
doc-preview-cleanup.ymlremoves a pull request's docs preview when it closes
TagBot.ymltags each release once it is registered