Private API

This page lists non-exported (internal) symbols of CTBase.


From CTBase

AbstractCoveragePostprocessingTag

CTBase.AbstractCoveragePostprocessingTagType
abstract type AbstractCoveragePostprocessingTag

Abstract 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
true

AbstractDocumenterReferenceTag

CTBase.AbstractDocumenterReferenceTagType
abstract type AbstractDocumenterReferenceTag

Abstract 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
true

AbstractTestRunnerTag

CTBase.AbstractTestRunnerTagType
abstract type AbstractTestRunnerTag

Abstract 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.CoveragePostprocessingTagType
struct CoveragePostprocessingTag <: CTBase.AbstractCoveragePostprocessingTag

Concrete 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.DocumenterReferenceTagType
struct DocumenterReferenceTag <: CTBase.AbstractDocumenterReferenceTag

Concrete 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.TestRunnerTagType
struct TestRunnerTag <: CTBase.AbstractTestRunnerTag

Concrete 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_documentationFunction
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

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

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 or Module => source_files pairs 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 as title).
  • filename: base filename (without extension) for the markdown file.
  • source_files: global source file paths (fallback if no module-specific files). Deprecated: prefer using primary_modules=[Module => files] instead.
  • include_without_source: if true, include symbols whose source file cannot be determined. Default: false.
  • external_modules_to_document: additional modules to search for docstrings (e.g., [Plots] to include Plots.plot methods 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.ctNumberType

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
true

postprocess_coverage

CTBase.postprocess_coverageFunction
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 .cov files (keeping the most complete PID suffix when multiple runs exist)
  • Optionally generates reports (LCOV + markdown report)
  • Moves .cov files into coverage/cov/ (recursively from source dirs)

Keyword Arguments

  • generate_report::Bool=true: If true, write coverage/lcov.info and coverage/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_testsFunction
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

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

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 testset
  • available_tests::Vector{Symbol} = Symbol[] — if non-empty, only these tests are allowed
  • filename_builder::Function = identitySymbol → Symbol, builds the filename from the test name
  • funcname_builder::Function = identitySymbol → Symbol|Nothing, builds the function name (or nothing to skip eval)
  • eval_mode::Bool = true — whether to eval the function after include
  • verbose::Bool = true — verbose testset output
  • showtiming::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")