-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model example library for testing #157
Conversation
Just wanted to add what we discussed today and submit it to peer review: I was thinking a clean way to approach this "example registry" would be with a This would mean we can create examples before/while adding support for certain AST variants. It would also force us to implement the parser for each new AST extension ASAP, which I personally think is a good thing. @ozgurakgun what do you think? |
Great idea! It'll make adding new examples a lot easier. |
…ct walkdir filter
That doc coverage table is begging for a summary Pedro :)
…On Fri, 16 Feb 2024 at 12:01 pm, github-actions[bot] < ***@***.***> wrote:
Documentation Coverage This PR
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| ...jure_rules_proc_macro/src/lib.rs | 1 | 50.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 1 | 50.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| ...es/doc_solver_support/src/lib.rs | 1 | 50.0% | 1 | 50.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 1 | 50.0% | 1 | 50.0% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| crates/conjure_rules/src/lib.rs | 2 | 66.7% | 1 | 33.3% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 2 | 66.7% | 1 | 33.3% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| crates/conjure_core/src/ast.rs | 12 | 26.1% | 0 | 0.0% |
| crates/conjure_core/src/lib.rs | 0 | 0.0% | 0 | 0.0% |
| crates/conjure_core/src/rule.rs | 0 | 0.0% | 0 | 0.0% |
| crates/conjure_core/src/solvers.rs | 2 | 40.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 14 | 23.3% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| crates/uniplate/src/lib.rs | 1 | 100.0% | 1 | 100.0% |
| crates/uniplate/src/uniplate.rs | 7 | 70.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 8 | 72.7% | 1 | 9.1% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| solvers/kissat/src/lib.rs | 0 | 0.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 0 | 0.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| ...b2718f45/out/chuffed_bindings.rs | 0 | 0.0% | 0 | 0.0% |
| solvers/chuffed/src/lib.rs | 0 | 0.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 0 | 0.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| solvers/minion/src/ast.rs | 4 | 14.3% | 0 | 0.0% |
| solvers/minion/src/error.rs | 5 | 62.5% | 0 | 0.0% |
| solvers/minion/src/lib.rs | 1 | 100.0% | 1 | 100.0% |
| solvers/minion/src/run.rs | 2 | 100.0% | 1 | 100.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 12 | 30.8% | 2 | 11.8% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| conjure_oxide/src/error.rs | 1 | 14.3% | 0 | 0.0% |
| conjure_oxide/src/find_conjure.rs | 1 | 50.0% | 0 | 0.0% |
| ...ure_oxide/src/generate_custom.rs | 1 | 50.0% | 0 | 0.0% |
| conjure_oxide/src/lib.rs | 0 | 0.0% | 0 | 0.0% |
| conjure_oxide/src/parse.rs | 0 | 0.0% | 0 | 0.0% |
| conjure_oxide/src/rewrite.rs | 2 | 66.7% | 0 | 0.0% |
| conjure_oxide/src/rules/constant.rs | 1 | 100.0% | 0 | 0.0% |
| conjure_oxide/src/solvers/error.rs | 0 | 0.0% | 0 | 0.0% |
| conjure_oxide/src/solvers/kissat.rs | 1 | 14.3% | 0 | 0.0% |
| conjure_oxide/src/solvers/minion.rs | 1 | 100.0% | 0 | 0.0% |
| conjure_oxide/src/solvers/mod.rs | 0 | 0.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 8 | 24.2% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
Main
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| ...jure_rules_proc_macro/src/lib.rs | 1 | 50.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 1 | 50.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| ...es/doc_solver_support/src/lib.rs | 1 | 50.0% | 1 | 50.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 1 | 50.0% | 1 | 50.0% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| crates/conjure_rules/src/lib.rs | 2 | 66.7% | 1 | 33.3% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 2 | 66.7% | 1 | 33.3% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| crates/conjure_core/src/ast.rs | 12 | 26.1% | 0 | 0.0% |
| crates/conjure_core/src/lib.rs | 0 | 0.0% | 0 | 0.0% |
| crates/conjure_core/src/rule.rs | 0 | 0.0% | 0 | 0.0% |
| crates/conjure_core/src/solvers.rs | 2 | 40.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 14 | 23.3% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| crates/uniplate/src/lib.rs | 1 | 100.0% | 1 | 100.0% |
| crates/uniplate/src/uniplate.rs | 7 | 70.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 8 | 72.7% | 1 | 9.1% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| solvers/kissat/src/lib.rs | 0 | 0.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 0 | 0.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| ...b2718f45/out/chuffed_bindings.rs | 0 | 0.0% | 0 | 0.0% |
| solvers/chuffed/src/lib.rs | 0 | 0.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 0 | 0.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| solvers/minion/src/ast.rs | 4 | 14.3% | 0 | 0.0% |
| solvers/minion/src/error.rs | 5 | 62.5% | 0 | 0.0% |
| solvers/minion/src/lib.rs | 1 | 100.0% | 1 | 100.0% |
| solvers/minion/src/run.rs | 2 | 100.0% | 1 | 100.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 12 | 30.8% | 2 | 11.8% |
+-------------------------------------+------------+------------+------------+------------+
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| conjure_oxide/src/error.rs | 1 | 14.3% | 0 | 0.0% |
| conjure_oxide/src/find_conjure.rs | 1 | 50.0% | 0 | 0.0% |
| conjure_oxide/src/lib.rs | 0 | 0.0% | 0 | 0.0% |
| conjure_oxide/src/parse.rs | 0 | 0.0% | 0 | 0.0% |
| conjure_oxide/src/rewrite.rs | 2 | 66.7% | 0 | 0.0% |
| conjure_oxide/src/rules/constant.rs | 1 | 100.0% | 0 | 0.0% |
| conjure_oxide/src/solvers/error.rs | 0 | 0.0% | 0 | 0.0% |
| conjure_oxide/src/solvers/kissat.rs | 1 | 14.3% | 0 | 0.0% |
| conjure_oxide/src/solvers/minion.rs | 1 | 100.0% | 0 | 0.0% |
| conjure_oxide/src/solvers/mod.rs | 0 | 0.0% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 7 | 22.6% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
Code Coverage
This PR
<https://conjure-cp.github.io/conjure-oxide/coverage/cdb54538c05b3f8fcf9c44d5cc13b4740b76188a>
lines......: 30.7% (935 of 3049 lines)
functions..: 22.0% (97 of 440 functions)
branches...: no data found
Main <https://conjure-cp.github.io/conjure-oxide/coverage/main>
lines......: 84.1% (2781 of 3307 lines)
functions..: 61.6% (300 of 487 functions)
branches...: no data found
—
Reply to this email directly, view it on GitHub
<#157 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABNEUXFGAALIIKBDHSRK6LYT5DAPAVCNFSM6AAAAABCPXBRMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBYGI3DGOBWG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
CI is failing because of the following error:
This seems to be a CI issue? Not sure what's going on. @niklasdewally |
Already discussed this with @PedroGGBM over teams - there seems to be a duplicate version of the "code and documentation coverage" ci in this PR from when Pedro was experimenting with it. @PedroGGBM if you just delete the yaml file of the broken workflow it should just disappear. |
rm the conjure-output folder |
Documentation CoverageThis PR
Main
Code Coverage
|
Original issue #65:
The minion bindings should have fully runnable and testable documentation examples.
As suggested by Chris Jefferson, having a library of example models would cut down on code duplication in these doctests.
This should take the form of a public module inside the crate with functions such as:
This should be used to rewrite the example for the callback type. This example needn't include details of model construction (it is primarily concerned with how you print the results at the end) , so it is an ideal candidate for using an example model.
Also potentially add some model building shortcut functions, such as making n variables of domain 0..m..