-
Notifications
You must be signed in to change notification settings - Fork 39
Interpretation tests and pipeline updates #71
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
Merged
Merged
Changes from 100 commits
Commits
Show all changes
109 commits
Select commit
Hold shift + click to select a range
6facc2c
Add unit tests and update api reference
ColtonPayne 6990e03
Demo floating point wierdness
ColtonPayne 307004e
Add pre-commit hook for pytest
ColtonPayne 5522d33
Upd pre-commit
ColtonPayne 6cfc330
Upd
ColtonPayne 87bb9c7
Add pre-push hook for functional tests
ColtonPayne 53d3bc5
Add contributing.md
ColtonPayne 84c89c8
Add ruff linter
ColtonPayne ce96151
Revert "Add ruff linter"
ColtonPayne a4f136f
Add support for ruff linter
ColtonPayne 5af8466
Add a comment
ColtonPayne e618cdd
add initial classifier tests
ColtonPayne 198d20e
Merge pull request #1 from ColtonPayne/add-pytest
ColtonPayne da0621b
test: add JIT consistency check for hello world
ColtonPayne ff247ab
Merge pull request #2 from ColtonPayne/codex/add-tests-for-jit-and-pu…
ColtonPayne d88f451
test: revise hello world consistency
ColtonPayne 9b63e31
Merge branch 'main' into codex/add-tests-for-jit-and-pure-python-cons…
ColtonPayne d5f1296
Merge pull request #3 from ColtonPayne/codex/add-tests-for-jit-and-pu…
ColtonPayne 609a3bf
test: expand _ground_rule coverage
ColtonPayne 2c4dd66
test: fix interval constructor for hello world consistency
ColtonPayne a947acb
Merge branch 'main' into codex/add-tests-for-jit-and-pure-python-cons…
ColtonPayne e7cfe09
test: filter edge groundings when node clause narrows
ColtonPayne a382cf9
Merge pull request #5 from ColtonPayne/codex/add-tests-for-jit-and-pu…
ColtonPayne 7d54a2c
test: cover node recheck failure branch
ColtonPayne 8c15823
test: cover edge head node reuse
ColtonPayne 44b25de
test: cover edge recheck in _ground_rule
ColtonPayne c8ef7a8
Merge pull request #4 from ColtonPayne/codex/add-tests-for-full-branc…
ColtonPayne bfca28a
Pull in new changesz
ColtonPayne 132f5ee
Merge pull request #8 from ColtonPayne/lab-v2-main
ColtonPayne 63d2feb
Merge pull request #9 from ColtonPayne/add-pytest
ColtonPayne fbe3836
Update interpretation tests to use new fixed point module
ColtonPayne 627361e
Merge pull request #10 from ColtonPayne/codex/explain-interpretation_…
ColtonPayne 3a36b7d
Add tests for interpretation helpers
ColtonPayne de32278
test: expand reason coverage
ColtonPayne 4efc5a6
test: cover reason persistence branches
ColtonPayne 3a1ec05
test: extend reason branch coverage
ColtonPayne 84f8320
test: cover additional reason branches
ColtonPayne e2293e6
test: cover edge additions and static traces
ColtonPayne d25c009
test: cover edge atom and inconsistency branches
ColtonPayne 3806dbf
test: cover additional reason branches
ColtonPayne a41099e
Split interpretation tests into modules
ColtonPayne 63028a3
test: expand node rule coverage
ColtonPayne 4cc4555
test: cover edge rule branches in reason
ColtonPayne ce21a8f
test: cover delta-bound rule branches
ColtonPayne 8824a5e
test: cover edge rule static and inconsistency branches
ColtonPayne bdfffb1
test: cover remaining edge convergence branches
ColtonPayne c99493b
test: cover convergence break conditions
ColtonPayne 9314a24
test: assert convergence break outputs
ColtonPayne ea5783b
Merge pull request #11 from ColtonPayne/codex/add-unit-tests-for-help…
ColtonPayne 1a0deb8
test: exercise _start_fp via real Interpretation
ColtonPayne aeb144b
Merge pull request #16 from ColtonPayne/codex/review-test-setup-for-i…
ColtonPayne 4c6046b
Move get_dict tests into existing suite
ColtonPayne 8db807e
Add tests for get_final_num_ground_atoms and query
ColtonPayne 185a370
Add tests for update helpers
ColtonPayne cc4fb0d
Cover override and tracing branches in update_node
ColtonPayne 9049106
test: cover complement branches in _update_node
ColtonPayne 93c359d
test: cover _update_edge complement bookkeeping
ColtonPayne 1b2a752
test: cover _update_edge for both interpretations
ColtonPayne 206129c
Cover _update_edge complement delta branches
ColtonPayne 783519b
Cover complement predicate edge branches
ColtonPayne c651ecb
Merge pull request #17 from ColtonPayne/codex/add-full-branch-coverag…
ColtonPayne aee6fea
Revert "Add branch coverage tests for get_dict"
ColtonPayne 5d8dc6e
Merge pull request #18 from ColtonPayne/revert-17-codex/add-full-bran…
ColtonPayne f67bb48
Revert "Revert "Add branch coverage tests for get_dict""
ColtonPayne 3b8587b
Merge pull request #19 from ColtonPayne/revert-18-revert-17-codex/add…
ColtonPayne b207301
test: cover node complement branches
ColtonPayne 5d5bb00
test: cover predicate map append
ColtonPayne d54e47f
test: exercise node and edge branches
ColtonPayne 68a6f1c
test: cover update_edge complement branches
ColtonPayne 861071a
test: cover comparison and inconsistency branches
ColtonPayne f731e89
test: cover edge comparison and add-edge branches
ColtonPayne 932644e
Merge pull request #20 from ColtonPayne/codex/add-test-coverage-for-_…
ColtonPayne caa721f
consolidate interpretation tests
ColtonPayne 7e30a41
Extract reason tests into dedicated modules
ColtonPayne 1c63733
Merge pull request #22 from ColtonPayne/codex/move-tests-to-test_inte…
ColtonPayne 5c6d341
Merge pull request #23 from ColtonPayne/codex/consolidate-test_reason…
ColtonPayne 7f6b63e
Document testing hooks and add jit unit hook
ColtonPayne a8f2eb4
Merge pull request #24 from ColtonPayne/codex/update-contributing.md-…
ColtonPayne b345f28
refactor: consolidate interpretation tests
ColtonPayne 53e85a9
Merge pull request #27 from ColtonPayne/codex/consolidate-test_interp…
ColtonPayne 289e892
Add tests for interpretation branch coverage
ColtonPayne c8908e6
Expand interpretation.reason branch tests
ColtonPayne 44d56ca
test: cover atom trace and static node rule branches
ColtonPayne 62c90a2
test: cover edge rule zero-delta trace
ColtonPayne a17dfa3
Add tests for verbose convergence, ground atom count, and edge threshold
ColtonPayne 7867b47
Merge pull request #29 from ColtonPayne/codex/add-unit-tests-for-inte…
ColtonPayne 943282b
Upd naming of old interp tests
ColtonPayne b53ad97
Merge pull request #30 from ColtonPayne/upd-interp-tests
ColtonPayne e10e68e
Rm old classifier tests
ColtonPayne 834b6ba
Merge pull request #31 from ColtonPayne/prep-for-pr
ColtonPayne 5a6110f
test: cover interpretation init and start_fp
ColtonPayne 815dd2a
Merge pull request #32 from ColtonPayne/codex/add-tests-for-interpret…
ColtonPayne 97b6162
Remove unrelated changes
ColtonPayne d27c265
Merge pull request #33 from ColtonPayne/more-pr-prep
ColtonPayne 7414c44
Add cache status back
ColtonPayne a22736f
Merge pull request #34 from ColtonPayne/more-pr-prep
ColtonPayne b1832a6
Newline
ColtonPayne 202b08f
Merge pull request #35 from ColtonPayne/more-pr-prep
ColtonPayne ec95577
Add tests for annotation functions
ColtonPayne 4c6d3e7
Merge pull request #36 from ColtonPayne/codex/add-unit-tests-for-anno…
ColtonPayne 1b04907
Upd
ColtonPayne fdd1e87
Upd
ColtonPayne 50a8524
Merge pull request #38 from ColtonPayne/fix-flake8-linting
ColtonPayne dfcbc62
Upd pytest unit tests
ColtonPayne 01eb5ef
Merge pull request #39 from ColtonPayne/fix-flake8-linting
ColtonPayne 2e40431
Add other test suites
ColtonPayne c5e5008
Merge pull request #40 from ColtonPayne/fix-flake8-linting
ColtonPayne 780d37f
Add copilot fix
ColtonPayne 14b0d89
Merge pull request #41 from ColtonPayne/fix-flake8-linting
ColtonPayne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| repos: | ||
| - repo: local | ||
| hooks: | ||
| # --- Unit tests --- | ||
| - id: pytest-unit-with-coverage | ||
| name: Run unit tests with coverage and open report | ||
| entry: bash -c 'pytest tests/unit/disable_jit --cov pyreason --cov-report=html && open htmlcov/index.html' | ||
| language: system | ||
| pass_filenames: false | ||
|
|
||
| - id: pytest-unit-jit | ||
| name: Run JIT-enabled unit tests | ||
| entry: bash -c 'pytest tests/unit/dont_disable_jit' | ||
| language: system | ||
| pass_filenames: false | ||
|
|
||
| # --- Functional tests --- | ||
| - id: pytest-functional | ||
| name: Run functional tests | ||
| entry: bash -c 'pytest tests/functional' | ||
| language: system | ||
| pass_filenames: false | ||
| # Only run manually, not on every commit | ||
| stages: [pre-push] | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
|
|
||
| ## Getting Started | ||
|
|
||
| Install the project requirements and the pre-commit framework: | ||
|
|
||
| ```bash | ||
| pip install -r requirements.txt | ||
| pip install pre-commit | ||
| ``` | ||
|
|
||
| ## Setting up Pre-Commit Hooks | ||
|
|
||
| To ensure code quality and consistency, enable the pre-commit hooks: | ||
|
|
||
| ```bash | ||
| pre-commit install --hook-type pre-commit --hook-type pre-push | ||
| ``` | ||
|
|
||
| On every commit, the hooks will run the unit tests located in | ||
| `tests/unit/disable_jit` and `tests/unit/dont_disable_jit`. Functional tests in | ||
| `tests/functional` execute on every push. You can trigger all checks manually | ||
| with `pre-commit run --all-files`. | ||
|
|
||
| ## Linting | ||
|
|
||
| We are working to update the codebase to comply with `ruff` linting rules. Run | ||
| this command to view linting results: | ||
|
|
||
| ```bash | ||
| ruff check . | ||
| ``` | ||
|
|
||
| ## Running Tests Manually | ||
|
|
||
| The automated hooks cover most scenarios, but you can invoke the test suites | ||
| directly: | ||
|
|
||
| ```bash | ||
| pytest tests/unit | ||
| ``` | ||
|
|
||
| ```bash | ||
| pytest tests/functional | ||
| ``` | ||
|
|
||
| Running tests locally before committing or pushing helps catch issues early and | ||
| speeds up code review. |
This file contains hidden or 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
This file contains hidden or 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
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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
This file contains hidden or 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
File renamed without changes.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.