Skip to content

disberd/ExtendedLocalCoverage.jl

Repository files navigation

ExtendedLocalCoverage

Stable Documentation In development documentation Build Status Test workflow status Lint workflow Status Docs workflow Status Coverage Contributor Covenant All Contributors BestieTemplate

This package simply extends the functionality of LocalCoverage.jl by adding the following features:

  • Automatically extract the source files for the provided package using Revise.parse_pkg_files.
  • Automatically create an xml cobertura coverage and an html report using pycobertura.
    • The pycobertura library is automatically installed and used thanks to CondaPkg.jl and PythonCall.jl, not requiring the user to manually install python or lcov which is only available on non-windows systems.

This package was mainly created to provide easier access to code coverage within a private self-hosted gitlab instance, where codecov can not be used as is, but an HTML coverage report can be directly integrated within the gitlab web interface.

It is also convenient for getting an HTML coverage report locally without always relying on codecov from GH actions.

You can see an example of the generated HTML coverage report here, which was generated by calling generate_package_coverage(; force_paths_relative = true) on the PlutoPlotly.jl package.

Installation

The package is not currently registered in General, so you need to add it to your environment by doing:

] add https://github.com/disberd/ExtendedLocalCoverage.jl

or

import Pkg
Pkg.add(url="https://github.com/disberd/ExtendedLocalCoverage.jl")

Usage

For the basic usage which automatically extracts source files (including extensions) and generates the coverage report both in xml and html format, you can simply do the following (within the env of the package you are developing and making sure you have ExtendedLocalCoverage.jl in the LOAD_PATH):

using ExtendedLocalCoverage
cov_data = generate_package_coverage();

See the developer documentation for more details.

How to Cite

If you use ExtendedLocalCoverage.jl in your work, please cite using the reference given in CITATION.cff.

Contributing

If you want to make contributions of any kind, please first that a look into our contributing guide directly on GitHub or the contributing page on the website


Contributors

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages