Skip to content

Conversation

@rsenne
Copy link
Collaborator

@rsenne rsenne commented Dec 18, 2025

Resolves #70.

CI automation:

  • Added .github/workflows/Format-PR.yml to suggest code formatting changes on pull requests using julia-actions/julia-format.
  • Introduced .github/workflows/Format.yml to automatically run JuliaFormatter on a schedule or push, and create formatting pull requests using peter-evans/create-pull-request.

Code quality improvements:

  • Improved type annotation in DensityInterface.logdensityof by specifying that h is a History, enhancing type safety.
  • Optimized memory allocation in Poisson process fitting by initializing rates with Vector{R}(undef, n_bins) instead of zeros, improving performance.
  • Added a Base.length method for MultivariatePoissonProcess to return the number of marks (dimensions), increasing API completeness.

Test suite updates:

  • Replaced JuliaFormatter with JET for code linting in test/Project.toml and test/runtests.jl, and updated the corresponding testset from "Formatting" to "Code Linting". [1] [2] [3]

Introduces two GitHub Actions workflows for code formatting: one for PRs and one for scheduled/main branch runs. Updates test dependencies by replacing JuliaFormatter with JET, and modifies test code to use JET for code linting instead of formatting checks.
Implements Base.length for MultivariatePoissonProcess to return the number of marks. Updates logdensityof to require History type, optimizes rate vector allocation in inhomogeneous Poisson fit, and adjusts JET test configuration in runtests.
Copilot AI review requested due to automatic review settings December 18, 2025 19:52
@rsenne rsenne requested a review from JoseKling December 18, 2025 19:53
@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes the CI/CD infrastructure by replacing manual JuliaFormatter checks with automated GitHub Actions workflows and switching from JuliaFormatter to JET for code linting in tests. Additionally, it includes several targeted code quality improvements to enhance type safety, performance, and API completeness.

  • Added two GitHub Actions workflows for automated code formatting: one for scheduled/push-triggered formatting PRs, and another for PR-based format suggestions
  • Replaced JuliaFormatter with JET for static code analysis in the test suite
  • Enhanced type safety, memory allocation efficiency, and API completeness in the core library

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/Format.yml New workflow to automatically format code and create PRs on schedule or push to main
.github/workflows/Format-PR.yml New workflow to suggest formatting changes on pull requests
test/Project.toml Replaced JuliaFormatter dependency with JET for code linting
test/runtests.jl Updated test to use JET.test_package instead of format check, with Julia 1.11+ version guard
src/abstract_point_process.jl Added explicit History type annotation to logdensityof method for improved type safety
src/poisson/inhomogeneous/fit.jl Optimized memory allocation by using undef instead of zeros for rates vector
src/poisson/poisson_process.jl Added Base.length method for MultivariatePoissonProcess to return dimension count

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Owner

@JoseKling JoseKling left a comment

Choose a reason for hiding this comment

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

Cool. Looks good.

Thanks for all the work!

@rsenne rsenne merged commit 66f009e into JoseKling:main Dec 19, 2025
6 checks passed
@rsenne rsenne deleted the add_jet branch December 19, 2025 14:58
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.

Implement JET.jl testing and move JuliaFormatter test to pre-commit hook

2 participants