Skip to main content

Primula is a code coverage tool for Vim script.

https://img.shields.io/pypi/v/primula https://github.com/hattya/primula/actions/workflows/ci.yml/badge.svg https://ci.appveyor.com/api/projects/status/if338u3j55a8kekm?svg=true https://codecov.io/gh/hattya/primula/branch/master/graph/badge.svg

Installation

$ pip install primula

Requirements

  • Python 3.10+

  • coverage 5.0+

  • Vim 7.4+

Usage

run

$ primula run vim --clean -Nnu vimrc -S /path/to/script.vim -c q
$ primula report -m

The contents of vimrc as follow:

if $PROFILE !=# ''
  execute 'profile start' $PROFILE
  profile! file ./*
endif

combine

$ vim --clean -Nn --cmd "profile start profile.txt" --cmd "profile! file ./*" -S /path/to/script.vim -c q
$ primula combine profile.txt
$ primula report -m

Configuration

.coveragerc

[primula]
environ = PROFILE
profile = profile.txt
cond

It controls whether following condition commands to be included as statements.

  • :elsei[f]

  • :cat[ch]

  • :fina[lly]

They are counted by Vim 8.1.309+.

Default: True

end

It controls whether following end commands to be included as statements.

  • :en[dif]

  • :endw[hile]

  • :endfo[r]

  • :endt[ry]

  • :endf[unction]

Default: False

environ

An environment variable name.

Default: PROFILE

profile

A profile output path.

Default: profile.txt

License

Primula is distributed under the terms of the Apache License, Version 2.0.

Metadata

Release files for primula 0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for primula 0.7
File Size Uploaded
primula-0.7.tar.gz 28.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for primula 0.7
File Interpreter ABI Platform
primula-0.7-py3-none-any.whl Python 3 none any Details

Total release size: 44.6 kB

Release files / primula-0.7.tar.gz

Download URL primula-0.7.tar.gz
Size 28.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ff881cf687f14b2bbc8e334e770dfa1cdc42d7562117c77fd5ecb4b21f12e43b
BLAKE2b-256 checksum
How to use checksums
2644a3dea868d775633ae6c8ae08c5247ac62020c294dfdb63ee1dc8191ae9b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / primula-0.7-py3-none-any.whl

Download URL primula-0.7-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f41c40dddc21c3f60ce01b590b03bd2afea77af7eaef36965cc9ba4045e98a9c
BLAKE2b-256 checksum
How to use checksums
20ad738232d2deb95d0cdf77fde75e316f6aaacd840d95980b8b8916ad88e3c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.7 This release

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page