-
Notifications
You must be signed in to change notification settings - Fork 2
Add jet and add JuliaFormatter github action #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
Conversation
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.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
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.
JoseKling
left a comment
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.
Cool. Looks good.
Thanks for all the work!
Resolves #70.
CI automation:
.github/workflows/Format-PR.ymlto suggest code formatting changes on pull requests usingjulia-actions/julia-format..github/workflows/Format.ymlto automatically runJuliaFormatteron a schedule or push, and create formatting pull requests usingpeter-evans/create-pull-request.Code quality improvements:
DensityInterface.logdensityofby specifying thathis aHistory, enhancing type safety.rateswithVector{R}(undef, n_bins)instead ofzeros, improving performance.Base.lengthmethod forMultivariatePoissonProcessto return the number of marks (dimensions), increasing API completeness.Test suite updates:
JuliaFormatterwithJETfor code linting intest/Project.tomlandtest/runtests.jl, and updated the corresponding testset from "Formatting" to "Code Linting". [1] [2] [3]