Skip to content

Commit

Permalink
v0.1.2 (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwandrebeck committed Apr 5, 2022
1 parent 7b78311 commit a3ad1f2
Show file tree
Hide file tree
Showing 7 changed files with 705 additions and 41 deletions.
59 changes: 35 additions & 24 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Rust

on:
push:
branches: [ main, staging, trying ]
branches: [ main, staging, trying, v0.1.* ]
pull_request:
branches: [ main ]

Expand All @@ -20,8 +20,8 @@ jobs:
- nightly
steps:
- uses: actions/checkout@v2
- name: install gnuplot
run: sudo apt-get update && sudo apt-get install -y gnuplot
#- name: install gnuplot
# run: sudo apt-get update && sudo apt-get install -y gnuplot
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} && rustup component add rustfmt clippy
- name: Cargo fmt
uses: actions-rs/cargo@v1
Expand All @@ -42,30 +42,41 @@ jobs:
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: nextest
args: run --release --verbose
- name: Run bench
uses: actions-rs/cargo@v1
with:
command: bench
command: test
args: --release --verbose
#- name: Run bench
# uses: actions-rs/cargo@v1
# with:
# command: bench
- name: Doc
uses: actions-rs/cargo@v1
with:
command: doc
args: --release --all --verbose
- uses: actions/checkout@master
- name: run cargo tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.19.1'
args: '--release --verbose --output-dir coverage --out Lcov'
- uses: codecov/codecov-action@v2
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: coverage/lcov.info
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust Nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
profile: minimal
- name: run cargo tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.20.0'
args: '--release --verbose --run-types Doctests --output-dir coverage --out Lcov'
- uses: codecov/codecov-action@v2
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: coverage/lcov.info
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ and to wrangle over those already [open](https://github.com/lwandrebeck/ripeg/is

### Code

Since nothing has yet been implemented, feel free to submit your PRs
Only one module has been implemented for now, feel free to submit your PRs. Work is ongoing on isa module now, if that can help to prevent duplicate work.

### Tests

Tests are mandatory for a PR to be accepted. We want coverage to flirt with 100%. Luckily for us, having a complete test coverage is far easier to get with a brand new project.

Please Add your tests as doctests for *every* method.

### Benchmark

Benches are mandatory for a PR to be accepted. We want coverage to flirt with 100%. Luckily for us, having a complete bench coverage is far easier to get with a brand new project.
Expand All @@ -54,4 +56,4 @@ The normal rust coding style is checked by [rustfmt](https://github.com/rust-lan
Readable code is the first step on having good and safe libraries.

To avoid slight differences appearing in nightly versions, please
use the following command to run rustfmt: `cargo +stable fmt`
use the following command to run rustfmt: `cargo +stable fmt` before submitting a PR.
25 changes: 23 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,35 @@ description = "Incremental PEG parser Rust library"
documentation = "https://docs.rs/ripeg"
edition = "2021"
homepage = "https://lwandrebeck.github.io/ripeg/"
keywords = ["grammar", "parse", "parser", "parsing", "peg"]
keywords = ["grammar", "packrat", "parse", "parser", "parsing", "peg"]
license = "GPL-3.0-or-later"
name = "ripeg"
readme = "README.md"
repository = "https://github.com/lwandrebeck/ripeg"
version = "0.1.1"
version = "0.1.2"

[dependencies]
bitvec = "1"

[dev-dependencies]
criterion = { git = "https://github.com/bheisler/criterion.rs", branch = "version-0.4" }

[[bench]]
name = "charset_bench"
harness = false

[profile.bench]
lto = true

[profile.release]
lto = true

[profile.test]
codegen-units = 16
debug = false
debug-assertions = false
incremental = false
lto = true
opt-level = 3
overflow-checks = false
rpath = false
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
[![pr](https://img.shields.io/github/issues-pr/lwandrebeck/ripeg.svg)](https://github.com/lwandrebeck/ripeg/pulls)
[![prc](https://img.shields.io/github/issues-pr-closed/lwandrebeck/ripeg.svg)](https://github.com/lwandrebeck/ripeg/pulls?q=is%3Apr+is%3Aclosed)

This project intends to be a Rust port of https://github.com/zyedidia/gpeg/ which is itself inspired by http://www.inf.puc-rio.br/~roberto/lpeg/. One of existing research publications about incremental PEG is https://zyedidia.github.io/preprints/gpeg_sle21.pdf
This project intends to be a Rust port of https://github.com/zyedidia/gpeg/ which is itself inspired by http://www.inf.puc-rio.br/~roberto/lpeg/. Related research publications about incremental PEG are https://zyedidia.github.io/notes/yedidia_thesis.pdf and https://zyedidia.github.io/preprints/gpeg_sle21.pdf

## Contributing
PRs are more than welcome, I’d like a lot this project not to be a one-random-guy work. Please read [Contributing](https://github.com/lwandrebeck/ripeg/blob/main/CONTRIBUTING.md)
Expand All @@ -31,13 +31,19 @@ PRs are more than welcome, I’d like a lot this project not to be a one-random-
Please follow the [CoC from rust-lang](https://www.rust-lang.org/policies/code-of-conduct). I’ll be glad if I can avoid any kind of moderation, I have better to do with my time, thanks !

## Current status
Nothing to see here yet. CI and such are being configured before code development begins.
A first part of code has been ported, but you definitely can't use that crate yet.

## Planned Roadmap
## Roadmap
* 20220319 0.1.0 : ripeg crate published so name is reserved.
* 20220322 0.1.1 : release with CI, code coverage configured, and use of cargo-nextest.
* 2022???? 0.1.2 : release with functions/methods prototypes and todo!(); bodies.
* 202????? 0.1.3..n: replace todo!(); function/methods bodies with real code.
* 20220405 0.1.2 :
* release with charset module ported.
* Use of cargo test instead of nextest because it does not support doc tests yet.
* Comment out criterion bench in github actions as results are useless in CI env.
* Update tarpaulin to 0.20.0, and fix test coverage.
* Please note that charset methods prototypes may change.
* 2022???? 0.1.3 : release with isa module ported.
* 202????? 0.1.4..n: port other modules.
* 202????? 0.2.0 : 1st usable version.
* 202????? 0.x.y : optimize
* 202????? 1.0.0 : stable release.
Loading

0 comments on commit a3ad1f2

Please sign in to comment.