-
Notifications
You must be signed in to change notification settings - Fork 1
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 comprehensive tests #27
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f2648a9
add test hook, fixed some broken tests, and corrected a few typos.
mmcdermott 2ab643a
Forgot to add the .github hooks files
mmcdermott bd1e212
Renaming as this repo uses instead of .
mmcdermott 6952ff9
Fixed doctest by adding polars table width control.
mmcdermott 49c8f76
Added skips for tests that have not yet been implemented, such that t…
mmcdermott 594177b
Added missing dependency.
mmcdermott dee5745
Update code-quality-master.yaml
justin13601 08615dc
Update code-quality-pr.yaml
justin13601 19aaabd
Update tests.yml
justin13601 db400c1
Update code-quality-pr.yaml
justin13601 9ded12d
Update code-quality-master.yaml
justin13601 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 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,22 @@ | ||
# Same as `code-quality-pr.yaml` but triggered on commit to main branch | ||
# and runs on all files (instead of only the changed ones) | ||
|
||
name: Code Quality Main | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
code-quality: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
|
||
- name: Run pre-commits | ||
uses: pre-commit/action@v3.0.0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This workflow finds which files were changed, prints them, | ||
# and runs `pre-commit` on those files. | ||
|
||
# Inspired by the sktime library: | ||
# https://github.com/alan-turing-institute/sktime/blob/main/.github/workflows/test.yml | ||
|
||
name: Code Quality PR | ||
|
||
on: | ||
pull_request: | ||
branches: [master, "release/*", "dev"] | ||
|
||
jobs: | ||
code-quality: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
|
||
- name: Find modified files | ||
id: file_changes | ||
uses: trilom/file-changes-action@v1.2.4 | ||
with: | ||
output: " " | ||
|
||
- name: List modified files | ||
run: echo '${{ steps.file_changes.outputs.files}}' | ||
|
||
- name: Run pre-commits | ||
uses: pre-commit/action@v3.0.0 | ||
with: | ||
extra_args: --files ${{ steps.file_changes.outputs.files}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master, "release/*", "dev"] | ||
|
||
jobs: | ||
run_tests_ubuntu: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install packages | ||
run: | | ||
pip install -e .[dev] | ||
|
||
#---------------------------------------------- | ||
# run test suite | ||
#---------------------------------------------- | ||
- name: Run tests | ||
run: | | ||
pytest -v --doctest-modules --ignore=profiling/ --ignore=run.py --cov=src -s | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4.0.1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests marked as not yet implemented.
Would you like assistance in implementing these tests or should I open a GitHub issue to track this task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assistance would be great! Please write tests for these functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mmcdermott, I'll help you by drafting the unit tests for the functions
test_summarize_event_bound_window
,test_summarize_window
, andtest_summarize_subtree
. Here are the proposed tests:Test for
test_summarize_event_bound_window
This function likely summarizes data within a specific event-bound window. We'll assume it needs to handle various edge cases similar to
test_summarize_temporal_window
.Test for
test_summarize_window
This function likely handles summarization over a generic window of data.
Test for
test_summarize_subtree
This function likely summarizes data across a subtree structure.
Please review these test outlines and adjust them according to the specific logic and requirements of each function. If you need further modifications or have specific scenarios in mind, feel free to let me know!