-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix some issues and add more tests #58
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Separated longer methods into multiple methods. Changed variable names to be be more distinct and readable. Removed unused lines of code. Made function accept interfaces list or map to shorten the definition. Underlying implementation is not changed.
equals now returns true if the data entries have the same headers and data. This is useful for testing
need to add more tests once Analysis class is done
I was terribly misguided when I first wrote the tests. The new initialization of objects should reduce the byte code and increase testing/building speeds
Last pattern was not included in a sequence. Also set the minimums to always be positive to prevent breaking the looping constraints or index out of bounds. Changed the names of variables in Analysis class to make it more clear what sequences are being handled. Used List.of in Analysis class becuase it is structurally immutable (which is safer when not expecting the list to be modified in place)
maybe not the most exhaustive list of tests, but should be able to catch major mistake if the class is edited. Also, it appears the the PPF divisor is number of patterns of the same length. This appears to be desired behavior based on the commit message 9759aff
made methods smaller to make testing easier. Moved getting baseline outside event window method to reduce the number of dependencies in a single method
…gain. Removed unnecessary file reads to make testing easier and code more modular.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #55, fixes #56, and fixes #57
Added tests for Sequences, Patterns, and Windows. The tests are not fully exhaustive but I think I checked the important functions. I tried to separate out File writing/reading from program logic/calculation methods.
I also fixed a filtering error I had missed on place on my last PR.