Skip to content

Commit

Permalink
Merge pull request #2 from cicirello/development
Browse files Browse the repository at this point in the history
Added jacoco code coverage to build workflow, updated docs
  • Loading branch information
cicirello authored Oct 19, 2020
2 parents 8975bdd + d6f3f53 commit ed37657
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
java-version: 1.11

- name: Build with Maven
run: mvn -B package
run: mvn -B package -Pcoverage
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Copyright (C) 2015, 2017-2020 Vincent A. Cicirello.

https://www.cicirello.org/

| __Packages and Releases__ | [![Maven Central](https://img.shields.io/maven-central/v/org.cicirello/ziggurat.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.cicirello/ziggurat) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/cicirello/ZigguratGaussian?logo=GitHub)](https://github.com/cicirello/ZigguratGaussian/releases) |
| :--- | :--- |
| __Source and Build Info__ | [![build](https://github.com/cicirello/ZigguratGaussian/workflows/build/badge.svg)](https://github.com/cicirello/ZigguratGaussian/actions?query=workflow%3Abuild) [![GitHub](https://img.shields.io/github/license/cicirello/ZigguratGaussian)](https://github.com/cicirello/ZigguratGaussian/blob/master/LICENSE) |

## Overview

This repository contains a Java implementation of the Ziggurat
Expand Down Expand Up @@ -45,6 +49,42 @@ additional experimental data:
If you want to build from the source, then execute `mvn package` at the root
of the repository.

## Importing the Library from Maven Central

Add this to the dependencies section of your pom.xml, replacing
the version number with the version that you want to use.

```XML
<dependency>
<groupId>org.cicirello</groupId>
<artifactId>ziggurat</artifactId>
<version>1.0.0</version>
</dependency>
```

## Importing the Library from GitHub Packages

If you'd prefer to import from GitHub Packages, rather than
Maven Central: (1) add the dependency as indicated in
previous section above, and (2) add
the following to the repositories section of your pom.xml:

```XML
<repository>
<id>github</id>
<name>GitHub cicirello Apache Maven Packages</name>
<url>https://maven.pkg.github.com/cicirello/ZigguratGaussian</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
```

## Downloading Jar Files

If you don't use a dependency manager that supports importing from Maven Central,
or if you simply prefer to download manually, prebuilt jars are also attached to
each [GitHub Release](https://github.com/cicirello/ZigguratGaussian/releases).

## License

The example programs in this repository are licensed under
Expand Down
26 changes: 26 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,32 @@
</repository>
</distributionManagement>
</profile>
<profile>
<id>coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>generate-code-coverage-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<issueManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class ZigguratGaussianTests {

// Test cases use chi square goodness of fit. This constant
// can be used to adjust the number of samples used for this test.
private static final int EXPECTED_SAMPLES_PER_BUCKET = 30;
private static final int EXPECTED_SAMPLES_PER_BUCKET = 60;

// Change to true to see extra statistical output not otherwise used
// by automated tests (e.g., to see the specific chi square statistic value).
Expand Down

0 comments on commit ed37657

Please sign in to comment.