Skip to content

Commit c4055c7

Browse files
authored
Merge branch 'develop' into fix/ignore-none-type-categories
2 parents 602721c + 70b454b commit c4055c7

File tree

6 files changed

+33
-9
lines changed

6 files changed

+33
-9
lines changed

.github/workflows/sonarqube.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
echo "sonar.projectKey=${{ github.event.repository.name }}" > sonar-project.properties
2626
2727
- name: SonarQube Scan
28-
uses: sonarsource/sonarqube-scan-action@v2.3.0
28+
uses: sonarsource/sonarqube-scan-action@v3.0.0
2929
env:
3030
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3131
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ statsmodels>=0.13.2, <1
2222
# type checking
2323
typeguard>=3, <5
2424
imagehash==4.3.1
25-
wordcloud>=1.9.1
25+
wordcloud>=1.9.3
2626
dacite>=1.8
2727
numba>=0.56.0, <1

src/ydata_profiling/compare_reports.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,6 @@ def _compare_profile_report_preprocess(
138138
config.html.style.primary_colors
139139
)
140140

141-
# enforce same types
142-
for report in reports[1:]:
143-
report._typeset = reports[0].typeset
144-
145141
# Obtain description sets
146142
descriptions = [report.get_description() for report in reports]
147143
for label, description in zip(labels, descriptions):

src/ydata_profiling/visualisation/plot.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,13 +592,14 @@ def plot_timeseries_gap_analysis(
592592
label=label,
593593
color=color,
594594
alpha=0.65,
595+
x_compat=True,
595596
)
596597
_format_ts_date_axis(serie, ax)
597598
ax.yaxis.set_major_locator(MaxNLocator(integer=True))
598599
for gap in gaps_:
599600
ax.fill_between(x=gap, y1=min_, y2=max_, color=color, alpha=0.25)
600601
else:
601-
series.plot(ax=ax)
602+
series.plot(ax=ax, x_compat=True)
602603
_format_ts_date_axis(series, ax)
603604
ax.yaxis.set_major_locator(MaxNLocator(integer=True))
604605

@@ -677,11 +678,11 @@ def _plot_timeseries(
677678
colors = create_comparison_color_list(config)
678679

679680
for serie, color, label in zip(series, colors, labels):
680-
ax = serie.plot(color=color, label=label, alpha=0.75)
681+
ax = serie.plot(color=color, label=label, alpha=0.75, x_compat=True)
681682
_format_ts_date_axis(serie, ax)
682683

683684
else:
684-
ax = series.plot(color=config.html.style.primary_colors[0])
685+
ax = series.plot(color=config.html.style.primary_colors[0], x_compat=True)
685686
_format_ts_date_axis(series, ax)
686687

687688
return plot

tests/issues/test_issue1631.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""
2+
Test for issue 1631:
3+
https://github.com/ydataai/ydata-profiling/issues/1631
4+
"""
5+
import pandas as pd
6+
7+
from ydata_profiling import ProfileReport
8+
9+
10+
def test_issue1631(test_output_dir):
11+
data = {
12+
"value": [1, 2, 3, 4],
13+
"datetime": [
14+
"2022-10-01 00:10:00",
15+
"2022-10-02 00:20:00",
16+
"2022-10-03 00:30:00",
17+
"2022-10-04 00:40:00",
18+
],
19+
}
20+
df = pd.DataFrame(data)
21+
df["datetime"] = pd.to_datetime(df["datetime"], errors="raise")
22+
df.set_index("datetime", inplace=True)
23+
profile = ProfileReport(df, tsmode=True, type_schema={"value": "timeseries"})
24+
output_file = test_output_dir / "issue1631.html"
25+
profile.to_file(output_file)
26+
27+
assert output_file.exists()
File renamed without changes.

0 commit comments

Comments
 (0)