ydata-profiling
ydata-profiling copied to clipboard
chore(deps): upgrade to pydantic-2
This PR aims at
- upgrade pydantic dependency to version 2
- update and fix code and test after upgrade
@ndesaunais thank you for opening this PR!
There are a couple of issues:
- the PR title should be
chores(deps)
- the tests are failing:
pytest tests/unit/
ImportError while loading conftest '/home/runner/work/ydata-profiling/ydata-profiling/tests/conftest.py'.
tests/conftest.py:7: in <module>
from ydata_profiling.config import Settings
src/ydata_profiling/__init__.py:7: in <module>
from ydata_profiling.compare_reports import compare
src/ydata_profiling/compare_reports.py:9: in <module>
from ydata_profiling.config import Correlation, Settings
src/ydata_profiling/config.py:8: in <module>
from pydantic_settings import BaseSettings, SettingsConfigDict
E ModuleNotFoundError: No module named 'pydantic_settings'
make: *** [Makefile:10: test] Error 4
Error: Process completed with exit code 2.
You can test locally using pytest test/unit
.
Hello @aquemy,
Thank you for launching the ci multiple times along the way.
Now everything seems to be working fine. The only failing is the linting, which fails to pull the renovate/pydantic-2
instead of the actual name of the branch in your repo ndesaunais:renovate/pydantic-2
. I don't want to change that workflow as it's unrelated to this PR.
Can you have a look at it ?
Codecov Report
Patch coverage: 92.59%
and project coverage change: -0.16%
:warning:
Comparison is base (
bc1673a
) 89.70% compared to head (ce0697d
) 89.54%. Report is 8 commits behind head on develop.
:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@ Coverage Diff @@
## develop #1414 +/- ##
===========================================
- Coverage 89.70% 89.54% -0.16%
===========================================
Files 194 194
Lines 6254 6332 +78
===========================================
+ Hits 5610 5670 +60
- Misses 644 662 +18
Flag | Coverage Δ | |
---|---|---|
py3.8-ubuntu-22.04-pandas | 89.54% <92.59%> (-0.16%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Files Changed | Coverage Δ | |
---|---|---|
src/ydata_profiling/report/structure/report.py | 92.10% <0.00%> (ø) |
|
...g/report/structure/variables/render_categorical.py | 94.50% <66.66%> (-0.95%) |
:arrow_down: |
src/ydata_profiling/config.py | 99.56% <100.00%> (+<0.01%) |
:arrow_up: |
src/ydata_profiling/profile_report.py | 81.56% <100.00%> (+0.14%) |
:arrow_up: |
...rofiling/report/structure/variables/render_text.py | 98.14% <100.00%> (+0.10%) |
:arrow_up: |
tests/unit/test_config.py | 100.00% <100.00%> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hello @aquemy,
Thank you for launching the ci multiple times along the way.
Now everything seems to be working fine. The only failing is the linting, which fails to pull the
renovate/pydantic-2
instead of the actual name of the branch in your repondesaunais:renovate/pydantic-2
. I don't want to change that workflow as it's unrelated to this PR.Can you have a look at it ?
Hi @ndesaunais,
Thanks you for your time and effort to make this working!
Regarding the error, this might be a small misconfiguration in the CI. I bet that it does not take into account the fork prefix when looking for a branch. @vascoalramos could you eventually take a look at this? If it is too complicated to adjust the CI, I'll just create a similar branch from @ndesaunais fork to the main repo.
Yes @aquemy, we should probably do this:
If it is too complicated to adjust the CI, I'll just create a similar branch from @ndesaunais fork to the main repo.
Hello @aquemy,
What's the update on this ?
Hello all!
I was lurking around this PR due to a dependency incompatibility in a repo of mine, and noticed that another PR updating to pydantic
2 has already been merged in October 2023 (PR #1483). I am mentioning it here to make it easier for people to find it!
Hi @ndesaunais ,
thank you for your contribution. Can you please update your PR with the latest changes from dev?
Closing because PR 1483 already does the job