Skip to content

Add tests for AbstractDummyFilter and HypersphericalDummyFilter#1585

Merged
FlorianPfaff merged 4 commits intomainfrom
copilot/add-filters-and-tests
Mar 31, 2026
Merged

Add tests for AbstractDummyFilter and HypersphericalDummyFilter#1585
FlorianPfaff merged 4 commits intomainfrom
copilot/add-filters-and-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

The previous session added AbstractDummyFilter and HypersphericalDummyFilter but was interrupted before tests were written.

Changes

  • New test file pyrecest/tests/filters/test_hyperspherical_dummy_filter.py with 13 tests covering:
    • Correct dim for S² and S³
    • AssertionError on dim < 2
    • Initial filter_state is HypersphericalUniformDistribution
    • get_point_estimate() returns a unit-norm vector of the correct embedding dimension
    • predict_identity, predict_nonlinear, update_identity, update_nonlinear are all no-ops (state unchanged)
    • filter_state setter and set_state() are no-ops
    • get_estimate() returns the distribution object

Copilot AI and others added 2 commits March 31, 2026 13:23
Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/8f739157-b4c0-4ea4-bf0a-3f3ad11b796b

Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 31, 2026

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 9.12s
✅ JSON prettier 2 0 0 0 0.69s
✅ JSON v8r 2 0 0 2.82s
✅ MARKDOWN markdownlint 1 0 0 0 0.63s
✅ MARKDOWN markdown-table-formatter 1 0 0 0 0.2s
✅ PYTHON bandit 253 0 0 3.1s
✅ PYTHON black 253 0 0 0 4.37s
✅ PYTHON flake8 253 0 0 1.76s
✅ PYTHON isort 253 2 0 0 0.48s
✅ PYTHON mypy 253 0 0 4.06s
✅ PYTHON pylint 253 0 0 72.58s
✅ PYTHON ruff 253 2 0 0 0.04s
✅ REPOSITORY checkov yes no no 22.82s
✅ REPOSITORY gitleaks yes no no 5.39s
✅ REPOSITORY git_diff yes no no 0.06s
✅ REPOSITORY secretlint yes no no 5.89s
✅ REPOSITORY syft yes no no 3.45s
✅ REPOSITORY trivy-sbom yes no no 1.71s
✅ REPOSITORY trufflehog yes no no 16.12s
✅ YAML prettier 4 0 0 0 0.51s
✅ YAML v8r 4 0 0 5.66s
✅ YAML yamllint 4 0 0 0.47s

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.4.0 --custom-flavor-setup --custom-flavor-linters PYTHON_PYLINT,PYTHON_BLACK,PYTHON_FLAKE8,PYTHON_ISORT,PYTHON_BANDIT,PYTHON_MYPY,PYTHON_RUFF,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@FlorianPfaff
Copy link
Copy Markdown
Owner

@copilot fix the errors

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 31, 2026

Test Results

   12 files  ±  0     12 suites  ±0   3h 19m 16s ⏱️ + 13m 3s
  546 tests + 13    546 ✅ + 13      0 💤 ±0  0 ❌ ±0 
6 764 runs  +156  5 588 ✅ +156  1 176 💤 ±0  0 ❌ ±0 

Results for commit 1db7bb3. ± Comparison against base commit f5c0f75.

♻️ This comment has been updated with latest results.

auto-merge was automatically disabled March 31, 2026 19:48

Head branch was pushed to by a user without write access

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 31, 2026

@copilot fix the errors

Fixed in commit 1db7bb3:

  • abstract_dummy_filter.py: Added explicit __init__, changed predict_nonlinear(self, f, noise_distribution=None, *args)predict_nonlinear(self, f, *args, **kwargs) to resolve keyword-arg-before-vararg
  • hyperspherical_dummy_filter.py: Now calls AbstractDummyFilter.__init__ (direct parent) instead of AbstractFilter.__init__, resolving non-parent-init-called; removed the now-unused AbstractFilter import

Pylint rates both files 10.00/10 and all 13 tests still pass.

@FlorianPfaff FlorianPfaff merged commit ba67ab3 into main Mar 31, 2026
17 checks passed
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.

2 participants