Private API
This page lists non-exported (internal) symbols of CTBase.
From CTBase
AbstractCoveragePostprocessingTag
CTBase.AbstractCoveragePostprocessingTag — Type
abstract type AbstractCoveragePostprocessingTagAbstract supertype for tags used to select a particular implementation of postprocess_coverage.
Concrete subtypes identify a specific backend that provides the actual coverage post-processing logic.
Example
julia> using CTBase
julia> CTBase.CoveragePostprocessingTag() isa CTBase.AbstractCoveragePostprocessingTag
trueAbstractDocumenterReferenceTag
CTBase.AbstractDocumenterReferenceTag — Type
abstract type AbstractDocumenterReferenceTagAbstract supertype for tags used to select a particular implementation of automatic_reference_documentation.
Concrete subtypes identify a specific backend that provides the actual documentation generation logic.
Example
julia> using CTBase
julia> CTBase.DocumenterReferenceTag() isa CTBase.AbstractDocumenterReferenceTag
trueAbstractTestRunnerTag
CTBase.AbstractTestRunnerTag — Type
abstract type AbstractTestRunnerTagAbstract supertype for tags used to select a particular implementation of run_tests.
Concrete subtypes identify a specific backend that provides the actual test runner logic.
CoveragePostprocessingTag
CTBase.CoveragePostprocessingTag — Type
struct CoveragePostprocessingTag <: CTBase.AbstractCoveragePostprocessingTagConcrete tag type used to dispatch to the CoveragePostprocessing extension.
Instances of this type are passed to postprocess_coverage to enable coverage post-processing when the extension is available.
DocumenterReferenceTag
CTBase.DocumenterReferenceTag — Type
struct DocumenterReferenceTag <: CTBase.AbstractDocumenterReferenceTagConcrete tag type used to dispatch to the DocumenterReference extension.
Instances of this type are passed to automatic_reference_documentation to enable the integration with Documenter.jl when the DocumenterReference extension is available.
Example
julia> using CTBase
julia> tag = CTBase.DocumenterReferenceTag()
CTBase.DocumenterReferenceTag()TestRunnerTag
CTBase.TestRunnerTag — Type
struct TestRunnerTag <: CTBase.AbstractTestRunnerTagConcrete tag type used to dispatch to the TestRunner extension.
Instances of this type are passed to run_tests to enable the extension-based test runner when the extension is available.
automatic_reference_documentation
CTBase.automatic_reference_documentation — Function
automatic_reference_documentation(
::CTBase.AbstractDocumenterReferenceTag;
kwargs...
)
Generate API reference documentation pages for one or more modules.
This method is an extension point: the default implementation throws an ExtensionError unless a backend extension providing the actual implementation is loaded (e.g. the DocumenterReference extension).
Keyword Arguments
Forwarded to the active backend implementation.
Throws
ExtensionError: If no backend extension is loaded.
automatic_reference_documentation(; kwargs...)
Convenience wrapper for automatic_reference_documentation using the default backend tag.
Keyword Arguments
Forwarded to automatic_reference_documentation(DocumenterReferenceTag(); kwargs...).
Throws
ExtensionError: If the required backend extension is not loaded.
automatic_reference_documentation(;
subdirectory::String,
primary_modules,
sort_by::Function = identity,
exclude::Vector{Symbol} = Symbol[],
public::Bool = true,
private::Bool = true,
title::String = "API Reference",
title_in_menu::String = "",
filename::String = "",
source_files::Vector{String} = String[],
include_without_source::Bool = false,
external_modules_to_document::Vector{Module} = Module[],
)Automatically creates the API reference documentation for one or more modules and returns a structure which can be used in the pages argument of Documenter.makedocs.
Arguments
subdirectory: the directory relative to the documentation root in which to write the API files.primary_modules: a vector of modules orModule => source_filespairs to document. When source files are provided, only symbols defined in those files are documented.sort_by: a custom sort function applied to symbol lists.exclude: vector of symbol names to skip from the generated API.public: flag to generate public API page (default:true).private: flag to generate private API page (default:true).title: title displayed at the top of the generated page.title_in_menu: title displayed in the navigation menu (default: same astitle).filename: base filename (without extension) for the markdown file.source_files: global source file paths (fallback if no module-specific files). Deprecated: prefer usingprimary_modules=[Module => files]instead.include_without_source: iftrue, include symbols whose source file cannot be determined. Default:false.external_modules_to_document: additional modules to search for docstrings (e.g.,[Plots]to includePlots.plotmethods defined in your source files).
Multiple instances
Each time you call this function, a new object is added to the global variable DocumenterReference.CONFIG. Use reset_config!() to clear it between builds.
ctNumber
CTBase.ctNumber — Type
Type alias for a real number.
This constant is primarily meant as a short, semantic alias when writing APIs that accept real-valued quantities.
Example
julia> using CTBase
julia> CTBase.ctNumber === Real
truepostprocess_coverage
CTBase.postprocess_coverage — Function
postprocess_coverage(
::CTBase.AbstractCoveragePostprocessingTag;
generate_report,
root_dir
)
Post-process coverage artifacts produced by Pkg.test(; coverage=true).
This is an extension point: the default implementation throws an ExtensionError unless a backend extension (e.g. CoveragePostprocessing) is loaded.
Keyword Arguments
generate_report::Bool=true: Whether to generate summary reports.root_dir::String=pwd(): Project root directory used to locate coverage artifacts.
Throws
ExtensionError: If the coverage post-processing extension is not loaded.
postprocess_coverage(; kwargs...)
Convenience wrapper for postprocess_coverage using the default backend tag.
Keyword Arguments
Forwarded to postprocess_coverage(CoveragePostprocessingTag(); kwargs...).
Throws
ExtensionError: If the coverage post-processing extension is not loaded.
CTBase.postprocess_coverage(::CTBase.CoveragePostprocessingTag; generate_report::Bool=true, root_dir::String=pwd())Post-process coverage artifacts produced by Pkg.test(; coverage=true).
This implementation:
- Collects coverage source directories under
root_dir(src/,test/,ext/when present) - Resets the
coverage/directory - Removes stale
.covfiles (keeping the most complete PID suffix when multiple runs exist) - Optionally generates reports (LCOV + markdown report)
- Moves
.covfiles intocoverage/cov/(recursively from source dirs)
Keyword Arguments
generate_report::Bool=true: Iftrue, writecoverage/lcov.infoandcoverage/cov_report.md.root_dir::String=pwd(): Root directory of the project.
Returns
Nothing
Notes
This function creates/removes/moves files and directories under root_dir.
Usage sketch (non-executed)
using CTBase
# CTBase.postprocess_coverage(; generate_report=true, root_dir=pwd())run_tests
CTBase.run_tests — Function
run_tests(
::CTBase.AbstractTestRunnerTag;
kwargs...
) -> Union{Nothing, Test.FallbackTestSet, Test.DefaultTestSet}
Run the project test suite using an extension-provided test runner.
This is an extension point: the default implementation throws an ExtensionError unless a backend extension is loaded.
Keyword Arguments
Forwarded to the active backend implementation.
Throws
ExtensionError: If the test runner extension is not loaded.
run_tests(
;
kwargs...
) -> Union{Nothing, Test.FallbackTestSet, Test.DefaultTestSet}
Convenience wrapper for run_tests using the default backend tag.
Keyword Arguments
Forwarded to run_tests(TestRunnerTag(); kwargs...).
Throws
ExtensionError: If the test runner extension is not loaded.
run_tests(::CTBase.TestRunnerTag; kwargs...)Run tests with configurable file/function name builders and optional available tests filter.
Keyword Arguments
testset_name::String = "Tests"— name of the main testsetavailable_tests::Vector{Symbol} = Symbol[]— if non-empty, only these tests are allowedfilename_builder::Function = identity—Symbol → Symbol, builds the filename from the test namefuncname_builder::Function = identity—Symbol → Symbol|Nothing, builds the function name (or nothing to skip eval)eval_mode::Bool = true— whether to eval the function after includeverbose::Bool = true— verbose testset outputshowtiming::Bool = true— show timing in testset output
Notes
- Test selection is driven by
Main.ARGS(coverage flags are ignored). - Selection arguments are interpreted as glob patterns and matched against both the test name and the corresponding filename.
Usage sketch (non-executed)
using CTBase
# CTBase.run_tests(; testset_name="Tests")