Skip to content
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

Add Dag.applySeq for sequential rule application #9

Merged
merged 2 commits into from
Sep 7, 2017
Merged

Conversation

oscar-stripe
Copy link
Contributor

No description provided.

* Apply a sequence of rules in order
* First apply one rule until it does not apply, then the next, etc..
*/
def applySeq(rules: Seq[Rule[N]]): Dag[N] =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

want to call these phases instead of rules to sort of hint at the ordering part?

/**
* If the current rule cannot apply, then try the argument here
* Note, this applies in series at a given node, not on the whole
* Dag after the first rule has run. For that, see Dag.applySeq
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a couple periods.

@non
Copy link
Collaborator

non commented Sep 7, 2017

Modulo naming/grammar this is great. 👍

@non
Copy link
Collaborator

non commented Sep 7, 2017

👍

@codecov-io
Copy link

codecov-io commented Sep 7, 2017

Codecov Report

Merging #9 into master will increase coverage by 0.14%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #9      +/-   ##
==========================================
+ Coverage   86.09%   86.24%   +0.14%     
==========================================
  Files          12       12              
  Lines         187      189       +2     
  Branches       13       15       +2     
==========================================
+ Hits          161      163       +2     
  Misses         26       26
Impacted Files Coverage Δ
core/src/main/scala/com/stripe/dagon/Dag.scala 94% <100%> (+0.06%) ⬆️
core/src/main/scala/com/stripe/dagon/Rule.scala 77.77% <100%> (+2.77%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e44c404...0d45c07. Read the comment docs.

@johnynek johnynek merged commit b652031 into master Sep 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants