Skip to content

Update build infra; better testing with minimal deps; ruff format#489

Merged
raphaelvallat merged 35 commits into
raphaelvallat:mainfrom
yann1cks:update_build_infra
Feb 22, 2026
Merged

Update build infra; better testing with minimal deps; ruff format#489
raphaelvallat merged 35 commits into
raphaelvallat:mainfrom
yann1cks:update_build_infra

Conversation

@yann1cks

Copy link
Copy Markdown
Contributor

Hello @raphaelvallat,

this PR includes the updates I mentioned in #480 and some additional changes:

  • Uses dependencies groups and not optional dependencies for dev dependencies. See Handbook for more info. Perhaps statsmodels and scikitlearn could become optional dependencies as well?
  • Updates the ruff config to sort imports and foramt doc strings as well. I did not enable stricter rules, that would require code changes, e.g. replacing pandas .at
  • Improve docs to directly link to source code on Github (function made with Claude).
  • Separate Github Actions in multiple parts and use uv to speed it up. I removed the codecov token, because it is publicly available. I think you should rewoke this token.

@yann1cks yann1cks changed the title Update build infra Update build infra and some dev improvements Feb 16, 2026
@codecov

codecov Bot commented Feb 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.40%. Comparing base (d583b45) to head (075676b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #489      +/-   ##
==========================================
- Coverage   98.45%   98.40%   -0.06%     
==========================================
  Files          19       19              
  Lines        3376     3380       +4     
  Branches      497      497              
==========================================
+ Hits         3324     3326       +2     
- Misses         27       28       +1     
- Partials       25       26       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yann1cks yann1cks changed the title Update build infra and some dev improvements Update build infra and some devops improvements Feb 16, 2026
@yann1cks

Copy link
Copy Markdown
Contributor Author

There are two different pytest setups.

One is called core and similar to the old one, but I removed some python versions. It tests different os and python versions with the newest dependency versions.

The other one defines hard coded dependency versions for different python versions and for different os versions as well. For python 3.10 I tried to select the oldest dependencies possible/sensible. This needs more maintenance. But it already shows that pingouin is not compatible with old pandas and numpy versions. There is also a weird dependency resolution error with statsmodels.

This leads to quite a lot of combinations. What do you think about that? Is it too much? Perhaps we could remove macOS or reduce the python versions for the core tests.

(Moreover there is pre release setup that only runs on schedule or manually.)

@raphaelvallat raphaelvallat requested review from Copilot and raphaelvallat and removed request for Copilot February 21, 2026 07:08
@raphaelvallat

Copy link
Copy Markdown
Owner

Thank you @yann1cks ! This is great.

  • Let's keep statsmodels and sklearn as standard dependencies
  • Thanks for the ruff updates. Is it possible to enable a longer --line-length (e.g. 120) for docstrings to avoid the line breaks?
  • I regenerated the codecov token
  • I love the new pytest setup! I've been meaning to implement something along the lines of test-dependency-combinations for a long time. That said, I would not want us to have to debug and fix edge cases for very old versions. My recommendation is therefore to remove the "really-old-versions" combination. We can also remove macos-latest as you suggested.

@yann1cks

Copy link
Copy Markdown
Contributor Author

I do not think it is possible to set a different line length for docstrings, see here. At least I do not know how to implement it.

Having the really-old-packages is beneficial to catch backwards compatibility problems. Some might be edge cases, but some are valid problems. Currently it is possible to install pingouin with pandas 1.5 (over three years old), but not every function will work correctly. This is not user friendly and we can avoid it, by setting sensible minium dependency versions. I would suggest raising the minimum pandas version to pandas 2.1 (over two years old), which includes the .map() function. The really-old-packages tests should reflect this change as well.

@raphaelvallat raphaelvallat changed the title Update build infra and some devops improvements Update build infra; better testing with minimal deps; ruff format Feb 22, 2026
@raphaelvallat

Copy link
Copy Markdown
Owner

@yann1cks please see my edits. All tests are passing ✅ Note that I had to bump pandas to 2.1.1 and statsmodels to 0.14.1 to avoid a bug on windows.

Comment thread pyproject.toml
]
dynamic = ["version"]
requires-python = ">=3.10"
dependencies = [

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think the minimal package versions from the tests should be used for the dependencies as well.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Good catch thanks

@yann1cks

Copy link
Copy Markdown
Contributor Author

Looks good to me. Just one comment about the required dependency versions in pyproject.toml.

Additionally the contributing.rst needs a rewrite because it describes the old GitHub Actions and is incomplete. But I can tackle that in another PR.

@raphaelvallat

Copy link
Copy Markdown
Owner

Thanks! I updated the contributing.rst file. I'll merge this PR when the tests are complete

@raphaelvallat raphaelvallat left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Merging! Thanks again

@raphaelvallat raphaelvallat merged commit d91247b into raphaelvallat:main Feb 22, 2026
24 of 25 checks passed
@raphaelvallat raphaelvallat mentioned this pull request Feb 22, 2026
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