Skip to content

Commit 22da35e

Browse files
authored
Merge pull request ydataai#780 from pandas-profiling/develop
v3.0.0
2 parents 02ed31a + 62f8e3f commit 22da35e

File tree

156 files changed

+3335
-2825
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+3335
-2825
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,69 @@
1-
---
2-
name: Bug report
3-
about: Create a report to help us improve
4-
title: ''
5-
labels: bug
6-
assignees: ''
7-
8-
---
9-
10-
**Describe the bug**
11-
12-
<!--
13-
A clear and concise description of what the bug is.
14-
If the description consists of multiple non-related bugs, you are encouraged to create separate issues.
15-
-->
16-
17-
**To Reproduce**
18-
19-
<!--
20-
We would need to reproduce your scenario before being able to resolve it.
21-
22-
_Data:_
23-
Please share your dataframe.
24-
If the data is confidential, for example when it contains company-sensitive information, provide us with a synthetic or open dataset that produces the same error.
25-
You should provide the DataFrame structure, for example by reporting the output of `df.info()`.
26-
You can anonymize the column names if necessary.
27-
28-
_Code:_ Preferably, use this code format:
29-
```python
30-
"""
31-
Test for issue XXX:
32-
https://github.com/pandas-profiling/pandas-profiling/issues/XXX
33-
"""
34-
import pandas as pd
35-
import pandas_profiling
36-
37-
38-
def test_issueXXX():
39-
df = pd.read_csv(r'<file>')
40-
41-
# Minimal reproducible code
42-
```
43-
-->
44-
45-
**Version information:**
46-
47-
<!--
48-
Version information is essential in reproducing and resolving bugs. Please report:
49-
50-
* _Python version_: Your exact Python version.
51-
* _Environment_: Where do you run the code? Command line, IDE (PyCharm, Spyder, IDLE etc.), Jupyter Notebook (Colab or local)
52-
* _`pip`_: If you are using `pip`, run `pip freeze` in your environment and report the results. The list of packages can be rather long, you can use the snippet below to collapse the output.
53-
54-
<details><summary>Click to expand <strong><em>Version information</em></strong></summary>
55-
<p>
56-
57-
```
58-
<<< Put your version information here >>>
59-
```
60-
61-
</p>
62-
</details>
63-
-->
64-
65-
**Additional context**
66-
67-
<!--
68-
Add any other context about the problem here.
69-
-->
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
12+
<!--
13+
A clear and concise description of what the bug is.
14+
If the description consists of multiple non-related bugs, you are encouraged to create separate issues.
15+
-->
16+
17+
**To Reproduce**
18+
19+
<!--
20+
We would need to reproduce your scenario before being able to resolve it.
21+
22+
_Data:_
23+
Please share your dataframe.
24+
If the data is confidential, for example when it contains company-sensitive information, provide us with a synthetic or open dataset that produces the same error.
25+
You should provide the DataFrame structure, for example by reporting the output of `df.info()`.
26+
You can anonymize the column names if necessary.
27+
28+
_Code:_ Preferably, use this code format:
29+
```python
30+
"""
31+
Test for issue XXX:
32+
https://github.com/pandas-profiling/pandas-profiling/issues/XXX
33+
"""
34+
import pandas as pd
35+
import pandas_profiling
36+
37+
38+
def test_issueXXX():
39+
df = pd.read_csv(r"<file>")
40+
41+
# Minimal reproducible code
42+
```
43+
-->
44+
45+
**Version information:**
46+
47+
<!--
48+
Version information is essential in reproducing and resolving bugs. Please report:
49+
50+
* _Python version_: Your exact Python version.
51+
* _Environment_: Where do you run the code? Command line, IDE (PyCharm, Spyder, IDLE etc.), Jupyter Notebook (Colab or local)
52+
* _`pip`_: If you are using `pip`, run `pip freeze` in your environment and report the results. The list of packages can be rather long, you can use the snippet below to collapse the output.
53+
54+
<details><summary>Click to expand <strong><em>Version information</em></strong></summary>
55+
<p>
56+
57+
```
58+
<<< Put your version information here >>>
59+
```
60+
61+
</p>
62+
</details>
63+
-->
64+
65+
**Additional context**
66+
67+
<!--
68+
Add any other context about the problem here.
69+
-->

.github/workflows/pypi.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ jobs:
3737
- name: Install
3838
run: make install
3939

40+
- name: Lint
41+
run: make lint
42+
4043
- name: Make distribution
4144
run: |
42-
check-manifest
4345
python setup.py sdist bdist_wheel
4446
twine check dist/*
4547

.pre-commit-config.yaml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 21.4b2
3+
rev: 21.5b0
44
hooks:
55
- id: black
66
language_version: python3.8
@@ -14,7 +14,7 @@ repos:
1414
- id: nbqa-pyupgrade
1515
args: [ --nbqa-mutate, --py36-plus ]
1616
- repo: https://github.com/asottile/pyupgrade
17-
rev: v2.14.0
17+
rev: v2.15.0
1818
hooks:
1919
- id: pyupgrade
2020
args: ['--py36-plus','--exit-zero-even-if-changed']
@@ -29,7 +29,7 @@ repos:
2929
hooks:
3030
- id: check-manifest
3131
- repo: https://github.com/PyCQA/flake8
32-
rev: "3.9.1"
32+
rev: "3.9.2"
3333
hooks:
3434
- id: flake8
3535
args: [ "--ignore=E203,E501,W291,W503,SFS301,SIM106" ]
@@ -39,6 +39,36 @@ repos:
3939
- flake8-simplify
4040
- flake8-eradicate
4141
- flake8-print
42+
- repo: https://github.com/PyCQA/flake8
43+
rev: "3.9.2"
44+
hooks:
45+
- id: flake8
46+
name: flake8-annotations
47+
args: [ "--select=ANN001,ANN201,ANN202,ANN205,ANN206,ANN301" ]
48+
additional_dependencies:
49+
- flake8-annotations
50+
# - flake8-annotations-complexity
51+
# - flake8-type-checking
52+
exclude: |
53+
(?x)(
54+
^tests/|
55+
^docsrc/|
56+
^src/pandas_profiling/utils/common.py|
57+
^src/pandas_profiling/model/imghdr_patch.py
58+
)
59+
60+
- repo: https://github.com/asottile/blacken-docs
61+
rev: v1.10.0
62+
hooks:
63+
- id: blacken-docs
64+
- repo: https://github.com/pre-commit/pygrep-hooks
65+
rev: v1.8.0
66+
hooks:
67+
- id: rst-backticks
68+
- repo: https://github.com/pre-commit/mirrors-mypy
69+
rev: 'v0.812'
70+
hooks:
71+
- id: mypy
4272

4373
ci:
4474
autoupdate_commit_msg: 'ci: pre-commit-config update'

Makefile

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,23 @@ test:
1515
pytest tests/unit/
1616
pytest tests/issues/
1717
pytest --nbval tests/notebooks/
18-
flake8 . --select=E9,F63,F7,F82 --show-source --statistics
1918
pandas_profiling -h
20-
make typing
2119

2220
test_cov:
2321
pytest --cov=. tests/unit/
2422
pytest --cov=. --cov-append tests/issues/
2523
pytest --cov=. --cov-append --nbval tests/notebooks/
2624
pandas_profiling -h
27-
make typing
2825

2926
examples:
3027
find ./examples -maxdepth 2 -type f -name "*.py" -execdir python {} \;
3128

32-
pypi_package:
33-
make install
34-
check-manifest
35-
python setup.py sdist bdist_wheel
36-
twine check dist/*
37-
twine upload --skip-existing dist/*
38-
3929
install:
4030
pip install -e .[notebook]
4131

4232
lint:
4333
pre-commit run --all-files
4434

45-
typing:
46-
pytest --mypy -m mypy .
47-
4835
clean:
4936
git rm --cached `git ls-files -i --exclude-from=.gitignore`
5037

@@ -54,4 +41,3 @@ all:
5441
make examples
5542
make docs
5643
make test
57-
make typing

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ For each column the following statistics - if relevant for the column type - are
3737

3838
## Announcements
3939

40-
**Version v2.13.0 released** featuring an exciting integration with Great Expectations that many of you requested (see details below).
40+
**Version v3.0.0 released** in which the report configuration was completely overhauled, providing a more intuitive API and fixing issues inherent to the previous global config.
41+
42+
This is the first release to adhere to the [Semver](https://semver.org/) and [Conventional Commits](https://conventionalcommits.org/) specifications.
4143

4244
**Spark backend in progress**: We can happily announce that we're nearing v1 for the Spark backend for generating profile reports.
43-
Stay tuned.
45+
Beta testers wanted! The Spark backend will be released as a pre-release for this package.
4446

4547
### Support `pandas-profiling`
4648

@@ -51,10 +53,10 @@ It's extra exciting that GitHub **matches your contribution** for the first year
5153

5254
Find more information here:
5355

54-
- [Changelog v2.13.0](https://pandas-profiling.github.io/pandas-profiling/docs/master/rtd/pages/changelog.html#changelog)
56+
- [Changelog v3.0.0](https://pandas-profiling.github.io/pandas-profiling/docs/master/rtd/pages/changelog.html#changelog)
5557
- [Sponsor the project on GitHub](https://github.com/sponsors/sbrugman)
5658

57-
_May 8, 2021 💘_
59+
_May 9, 2021 💘_
5860

5961
---
6062

@@ -149,10 +151,7 @@ import numpy as np
149151
import pandas as pd
150152
from pandas_profiling import ProfileReport
151153

152-
df = pd.DataFrame(
153-
np.random.rand(100, 5),
154-
columns=["a", "b", "c", "d", "e"]
155-
)
154+
df = pd.DataFrame(np.random.rand(100, 5), columns=["a", "b", "c", "d", "e"])
156155
```
157156
To generate the report, run:
158157
```python
@@ -164,7 +163,7 @@ profile = ProfileReport(df, title="Pandas Profiling Report")
164163
You can configure the profile report in any way you like. The example code below loads the [explorative configuration file](https://github.com/pandas-profiling/pandas-profiling/blob/master/src/pandas_profiling/config_explorative.yaml), that includes many features for text (length distribution, unicode information), files (file size, creation time) and images (dimensions, exif information). If you are interested what exact settings were used, you can compare with the [default configuration file](https://github.com/pandas-profiling/pandas-profiling/blob/master/src/pandas_profiling/config_default.yaml).
165164

166165
```python
167-
profile = ProfileReport(df, title='Pandas Profiling Report', explorative=True)
166+
profile = ProfileReport(df, title="Pandas Profiling Report", explorative=True)
168167
```
169168

170169
Learn more about configuring `pandas-profiling` on the [Advanced usage](https://pandas-profiling.github.io/pandas-profiling/docs/master/rtd/pages/advanced_usage.html) page.
@@ -248,7 +247,9 @@ You find the configuration docs on the advanced usage page [here](https://pandas
248247

249248
**Example**
250249
```python
251-
profile = df.profile_report(title='Pandas Profiling Report', plot={'histogram': {'bins': 8}})
250+
profile = df.profile_report(
251+
title="Pandas Profiling Report", plot={"histogram": {"bins": 8}}
252+
)
252253
profile.to_file("output.html")
253254
```
254255

docsrc/source/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ def _GetApiWrapperVersion():
4444
# ones.
4545
extensions = [
4646
"recommonmark",
47-
# "sphinx_multiversion",
4847
"sphinx.ext.autodoc",
4948
"sphinx.ext.autosummary",
5049
"sphinx.ext.coverage",
5150
"sphinx.ext.napoleon",
5251
"sphinx_autodoc_typehints",
5352
"sphinx.ext.viewcode",
53+
"sphinxcontrib.autodoc_pydantic",
5454
]
5555

5656
# Add any paths that contain templates here, relative to this directory.
@@ -82,3 +82,5 @@ def _GetApiWrapperVersion():
8282
autodoc_mock_imports = [""]
8383
autoclass_content = "both"
8484
autosummary_generate = True
85+
86+
autodoc_pydantic_model_show_json = False

0 commit comments

Comments
 (0)