Skip to content

Fix broken tests and CI pipeline - #2

Merged
viallww merged 13 commits into
mainfrom
fix/stabilize-ci-and-tests
Feb 27, 2026
Merged

Fix broken tests and CI pipeline#2
viallww merged 13 commits into
mainfrom
fix/stabilize-ci-and-tests

Conversation

@viallww

@viallww viallww commented Feb 27, 2026

Copy link
Copy Markdown
Owner

This PR stabilizes the project by fixing CI triggers, dependency issues, documentation build errors, and broken tests identified during the stabilization track.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the project's stability and maintainability by resolving a series of critical issues across the CI pipeline, dependency management, documentation generation, and test suite. It ensures that the project's automated checks run reliably, dependencies are correctly specified, and the documentation builds without errors, providing a solid foundation for future development.

Highlights

  • CI and Dependency Stabilization: Resolved critical CI pipeline failures by updating Project.toml dependencies and compatibility entries, and correcting digitalfilter usage in src/filter.jl.
  • Documentation Fixes: Fixed documentation build errors by ensuring the Buff module's docstring is properly included in docs/src/index.md and added extensive new project documentation under conductor/.
  • Test Suite Enhancements: Addressed broken tests by importing Statistics in test/test_outliers.jl, refining filter test assertions, and introducing new test files for plotting functionalities.
  • Algorithm Refinements: Improved the lttb algorithm's robustness by adjusting bucket average calculation and handling edge cases, and standardized interpolation function calls from LinearInterpolation to linear_interpolation for consistency.
Changelog
  • Project.toml
    • Reordered authors entry.
    • Added LinearAlgebra and Statistics to [compat].
    • Included Coverage and LocalCoverage in [extras] and [targets] for test coverage.
  • conductor/code_styleguides/general.md
    • Added a new document outlining general code style principles.
  • conductor/code_styleguides/julia.md
    • Added a new document detailing Julia-specific style guidelines.
  • conductor/index.md
    • Added a new index file for project context documentation.
  • conductor/product-guidelines.md
    • Added a new document defining product API design, documentation, code style, and testing standards.
  • conductor/product.md
    • Added a new document describing the project's initial concept, vision, target users, key features, and core values.
  • conductor/setup_state.json
    • Added a new JSON file to track the last successful setup step.
  • conductor/tech-stack.md
    • Added a new document detailing the project's technology stack.
  • conductor/tracks.md
    • Added a new document to track major project initiatives, including a link to the stabilization track.
  • conductor/tracks/stabilize_project_20260227/index.md
    • Added a new index file for the stabilize_project_20260227 track.
  • conductor/tracks/stabilize_project_20260227/metadata.json
    • Added a new JSON file containing metadata for the stabilization track.
  • conductor/tracks/stabilize_project_20260227/plan.md
    • Added a new document outlining the implementation plan for fixing tests and CI.
  • conductor/tracks/stabilize_project_20260227/spec.md
    • Added a new document specifying the problems and proposed solutions for the stabilization track.
  • conductor/workflow.md
    • Added a new comprehensive document detailing the project's development workflow, including task lifecycle, quality gates, and commit guidelines.
  • docs/src/index.md
    • Added an @docs Buff block to include the main module's documentation.
  • src/filter.jl
    • Corrected the argument order for fs in digitalfilter calls within lowpass_filter, highpass_filter, bandpass_filter, and bandstop_filter.
  • src/interpolate.jl
    • Replaced LinearInterpolation with linear_interpolation in interpolate_linear and fill_missing!.
  • src/lttb.jl
    • Updated the docstring for lttb to reflect a tuple return type.
    • Changed x collection to float(T) type.
    • Refined _lttb_indices to guard against empty next-buckets and initialized max_area to -1.0.
  • src/upsample.jl
    • Replaced LinearInterpolation with linear_interpolation in upsample_linear.
  • test/Project.toml
    • Added a new project file for test dependencies, including LinearAlgebra, PlotlyJS, Statistics, and Test.
  • test/runtests.jl
    • Included test_plots.jl in the main test suite.
  • test/test_filter.jl
    • Updated the lowpass_filter test to use a longer signal, different frequencies, and a more robust assertion range and tolerance.
  • test/test_outliers.jl
    • Added using Statistics to resolve an UndefVarError.
    • Included a new test case for detect_outliers with matrix input.
  • test/test_plots.jl
    • Added a new test file containing unit tests for plot_signal, plot_comparison, and plot_regression functions.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/CI.yml
Activity
  • The pull request was created to address critical stabilization issues identified during a dedicated stabilization track.
  • The author has systematically fixed CI triggers, dependency issues, documentation build errors, and broken tests as outlined in the conductor/tracks/stabilize_project_20260227/plan.md and spec.md.
  • Local verification steps, including running all tests and building documentation, were completed and passed.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request provides a comprehensive set of fixes that significantly stabilize the project. The updates to dependencies in Project.toml, fixes for deprecated API calls in DSP.jl and Interpolations.jl, and corrections to the test suite and documentation build are all excellent improvements. I found one potential type-stability issue in the lttb implementation, for which I've provided a suggestion. Overall, this is a high-quality contribution that addresses the stated goals effectively.

Comment thread src/lttb.jl Outdated
x = collect(one(T):T(length(y)))
)::Tuple{Vector{float(T)},Vector{float(T)}} where {T<:Real}
x = collect(float(T), 1:length(y))
return lttb(x, y, n_out; plot = plot)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

There's a potential type-stability issue here. The function signature declares a return type of Tuple{Vector{float(T)},Vector{float(T)}}. However, the call lttb(x, y, ...) preserves the element type of y. If y is a vector of integers (e.g., Vector{Int}), this function will incorrectly return a Tuple{Vector{Float64}, Vector{Int}}, violating its own type signature and causing type instability. To ensure correctness, you should convert y to a float vector before passing it to the next method.

    return lttb(x, float.(y), n_out; plot = plot)

@codecov

codecov Bot commented Feb 27, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@viallww

viallww commented Feb 27, 2026

Copy link
Copy Markdown
Owner Author

I have applied the suggested fix to ensure type stability in the implementation by converting to a float vector before dispatching to the main algorithm. All tests pass locally.

@viallww

viallww commented Feb 27, 2026

Copy link
Copy Markdown
Owner Author

I have applied the suggested fix to ensure type stability in the lttb implementation by converting y to a float vector before dispatching to the main algorithm. All tests pass locally.

@viallww
viallww merged commit c413b19 into main Feb 27, 2026
3 checks passed
@viallww
viallww deleted the fix/stabilize-ci-and-tests branch February 27, 2026 23:33
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.

1 participant