Skip to content

Developer overview ​

This page is for anyone working on EpiAwarePackageTools itself. It covers getting the code, running the tests, formatting and building the docs. Each step lists the Task target first and the plain Julia command after it.

Get the code ​

sh
git clone https://github.com/EpiAware/EpiAwarePackageTools.jl.git
cd EpiAwarePackageTools.jl
task setup

task setup instantiates the package, test, docs and other environments. Without Task, instantiate each one you need, for example julia --project=test -e 'using Pkg; Pkg.instantiate()'.

Run the tests ​

Tests are @testitems under test/, run by TestItemRunner.

TaskWithout TaskRuns
task testjulia --project=. -e 'using Pkg; Pkg.test()'Every test
task test-fastjulia --project=test test/runtests.jl skip_qualityEvery test but the quality checks
task test-qualityjulia --project=test test/runtests.jl quality_onlyOnly the quality checks

To run some items, filter them by file or name.

sh
julia --project=test -e 'using TestItemRunner; @run_package_tests filter = ti -> occursin("my_feature", ti.filename)'

Format and pre-commit ​

Code is formatted with Runic, from its own environment in test/formatter. Run task format, or without Task:

sh
julia --project=test/formatter -e 'using Pkg; Pkg.instantiate(); using Runic; exit(Runic.main(["-i", "src", "test"]))'

Run pre-commit install once so the hooks run on every commit. task precommit runs them on all files.

Build the docs ​

Run task docs-fast, or JULIA_NUM_THREADS=auto julia --project=docs docs/make.jl --skip-notebooks. task docs also runs the tutorials.

Before you open a pull request ​

task dev formats, runs pre-commit and the fast tests, and builds the docs. Then read Contributing.

Working on the kit ​

The kit's own files follow the same standard it writes into other packages. Two things differ from an ordinary package.

templates/ holds the files scaffold and update write into a package. A in a template is filled from the package's inputs, so a template .jl file is not valid Julia until it is rendered. src/scaffold.jl lists each template, whether it is managed or package-owned, and where it goes.

The kit is also scaffolded onto itself. After changing a template, run EpiAwarePackageTools.update(".") from the repository root and commit what it changes. CI fails when the kit's own copies drift from its templates.