Skip to content

Commit

Permalink
Merge pull request #92 from dsietz/development
Browse files Browse the repository at this point in the history
Version 0.3.0
  • Loading branch information
dsietz committed Nov 14, 2021
2 parents 5bb82c1 + 721cff1 commit 0269019
Show file tree
Hide file tree
Showing 24 changed files with 3,122 additions and 2,595 deletions.
122 changes: 122 additions & 0 deletions .github/workflows/development.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Development

on:
push:
branches: [ development ]
pull_request:
branches: [ development ]

env:
CARGO_TERM_COLOR: always

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check

test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy

audit:
name: Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true

coveralls-grcov:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Cargo clean
uses: actions-rs/cargo@v1
with:
command: clean
# - name: Gather coverage data # Error due to https://github.com/xd009642/tarpaulin/issues/461
# uses: actions-rs/tarpaulin@v0.1
# with:
# version: '0.15.0'
# out-type: 'Lcov'
# run-types: Tests
# args: '-- --test-threads 1'
- name: Gather coverage data
uses: docker://lpenz/ghaction-rust-coverage:0.2
- name: Coveralls upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
#coveralls-token: ${{ secrets.COVERALLS_TOKEN }}
path-to-lcov: lcov.info
parallel: true

grcov_finalize:
name: Grcov Finalize
runs-on: ubuntu-latest
needs: coveralls-grcov
steps:
- name: Coveralls finalization
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
122 changes: 122 additions & 0 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Master

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
CARGO_TERM_COLOR: always

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check

test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy

audit:
name: Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true

coveralls-grcov:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Cargo clean
uses: actions-rs/cargo@v1
with:
command: clean
# - name: Gather coverage data # Error due to https://github.com/xd009642/tarpaulin/issues/461
# uses: actions-rs/tarpaulin@v0.1
# with:
# version: '0.15.0'
# out-type: 'Lcov'
# run-types: Tests
# args: '-- --test-threads 1'
- name: Gather coverage data
uses: docker://lpenz/ghaction-rust-coverage:0.2
- name: Coveralls upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
#coveralls-token: ${{ secrets.COVERALLS_TOKEN }}
path-to-lcov: lcov.info
parallel: true

grcov_finalize:
name: Grcov Finalize
runs-on: ubuntu-latest
needs: coveralls-grcov
steps:
- name: Coveralls finalization
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ Cargo.lock
*.orig

# Generated file due to testing
/tests/samples/generated-01.csv
/tests/samples/generated-01.csv
/tests/samples/generated-01b.csv
48 changes: 0 additions & 48 deletions .travis.yml

This file was deleted.

7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "test-data-generation"
version = "0.2.1"
version = "0.3.0"
edition = "2018"
authors = ["dsietz <davidsietz@yahoo.com>"]
repository = "https://github.com/dsietz/test-data-generation.git"
Expand Down Expand Up @@ -29,7 +29,7 @@ maintenance = {status = "passively-maintained"}
config = "0.10"
lazy_static = "1.4"
log = "0.4"
log4rs = "0.10"
log4rs = "1.0"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
Expand All @@ -40,6 +40,9 @@ rand = "0.7"
crossbeam = "0.7"
csv = "1.1"
levenshtein = "1.0"
[dependencies.indexmap]
version = "1.7.0"
features = ["serde-1"]

[profile.release]
opt-level = 3
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Coverage Status](https://coveralls.io/repos/github/dsietz/test-data-generation/badge.svg?branch=master)](https://coveralls.io/github/dsietz/test-data-generation?branch=master)
[![Docs.rs](https://docs.rs/test-data-generation/badge.svg)](https://docs.rs/test-data-generation)

Linux: [![Build Status](https://travis-ci.org/dsietz/test-data-generation.svg?branch=master)](https://travis-ci.org/dsietz/test-data-generation)
Linux: [![Build Status](https://github.com/dsietz/test-data-generation/actions/workflows/master.yaml/badge.svg)](https://github.com/dsietz/test-data-generation/actions/workflows/master.yaml)
Windows: [![Build status](https://ci.appveyor.com/api/projects/status/uw58v5t8ynwj8s8o/branch/master?svg=true)](https://ci.appveyor.com/project/dsietz/test-data-generation/branch/master)

## [Fast test data generation!](#head1234)
Expand Down Expand Up @@ -41,9 +41,11 @@ or production environment (option #1 above)

## What's New

Here's whats new in 0.2.1:
+ [Fix for issue #88](https://github.com/dsietz/test-data-generation/issues/88)
+ Added a new Demo 03 `cargo run --example 03_demo`
Here's whats new in 0.3.0:
+ [Fix for issue #90](https://github.com/dsietz/test-data-generation/issues/90)
> Every effort has been made to automatically convert to the latest version of the DSP object when loading from a saved dsp file from a prior version, (e.g.: 0.2.1), however, it is not guaranteed.
+ [Added issue #91](https://github.com/dsietz/test-data-generation/issues/91)
> Optional paramters for setting the delimiter when analyzing and generating csv files.
## About

Expand Down
31 changes: 15 additions & 16 deletions examples/01_demo.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
extern crate test_data_generation;

use test_data_generation::data_sample_parser::DataSampleParser;

fn main() {

// This example demonstrates the basic feature of the library to generate dates and people's names from the built-in demo data sets
// using demo sample that is included in the library.

// initalize a new DataSampelParser
let dsp = DataSampleParser::new();

// generate some test data using the demo functions
println!("generate date:{}", dsp.demo_date());
println!("generate person:{}", dsp.demo_person_name());
}
extern crate test_data_generation;

use test_data_generation::data_sample_parser::DataSampleParser;

fn main() {
// This example demonstrates the basic feature of the library to generate dates and people's names from the built-in demo data sets
// using demo sample that is included in the library.

// initalize a new DataSampelParser
let dsp = DataSampleParser::new();

// generate some test data using the demo functions
println!("generate date:{}", dsp.demo_date());
println!("generate person:{}", dsp.demo_person_name());
}
Loading

0 comments on commit 0269019

Please sign in to comment.