Skip to content

Commit dc4829c

Browse files
authored
Merge branch 'master' into fix/pointplot_label
2 parents 02e6267 + 54cab15 commit dc4829c

File tree

132 files changed

+4539
-1253
lines changed

Some content is hidden

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

132 files changed

+4539
-1253
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
env:
1313
NB_KERNEL: python
1414
MPLBACKEND: Agg
15+
SEABORN_DATA: ${{ github.workspace }}/seaborn-data
1516

1617
jobs:
1718
build-docs:
@@ -34,9 +35,13 @@ jobs:
3435
sudo apt-get install pandoc
3536
3637
- name: Cache datasets
37-
run: python ci/cache_datasets.py
38+
run: |
39+
git clone https://github.com/mwaskom/seaborn-data.git
40+
ls $SEABORN_DATA
3841
3942
- name: Build docs
43+
env:
44+
SPHINXOPTS: -j `nproc`
4045
run: |
4146
cd doc
4247
make -j `nproc` notebooks
@@ -49,17 +54,14 @@ jobs:
4954
strategy:
5055
matrix:
5156
python: ["3.7", "3.8", "3.9", "3.10"]
52-
target: [test]
5357
install: [full]
5458
deps: [latest]
5559

5660
include:
5761
- python: "3.7"
58-
target: unittests
5962
install: full
6063
deps: pinned
6164
- python: "3.10"
62-
target: unittests
6365
install: light
6466
deps: latest
6567

@@ -78,11 +80,8 @@ jobs:
7880
if [[ ${{matrix.deps }} == 'pinned' ]]; then DEPS='-r ci/deps_pinned.txt'; fi
7981
pip install .[dev$EXTRAS] $DEPS
8082
81-
- name: Cache datasets
82-
run: python ci/cache_datasets.py
83-
8483
- name: Run tests
85-
run: make ${{ matrix.target }}
84+
run: make test
8685

8786
- name: Upload coverage
8887
uses: codecov/codecov-action@v2

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
export SHELL := /bin/bash
22

33
test:
4-
pytest -n auto --doctest-modules --cov=seaborn --cov=tests --cov-config=.coveragerc seaborn tests
5-
6-
unittests:
74
pytest -n auto --cov=seaborn --cov=tests --cov-config=.coveragerc tests
85

96
lint:

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,9 @@ Testing
6060

6161
Testing seaborn requires installing additional dependencies; they can be installed with the `dev` extra (e.g., `pip install .[dev]`).
6262

63-
To test the code, run `make test` in the source directory. This will exercise both the unit tests and docstring examples (using [pytest](https://docs.pytest.org/)) and generate a coverage report.
63+
To test the code, run `make test` in the source directory. This will exercise the unit tests (using [pytest](https://docs.pytest.org/)) and generate a coverage report.
6464

65-
The doctests require a network connection (unless all example datasets are cached), but the unit tests can be run offline with `make unittests`.
66-
67-
Code style is enforced with `flake8` using the settings in the [`setup.cfg`](./setup.cfg) file. Run `make lint` to check. Alternately, you can use `pre-commit` to automatically run lint checks on any files you are committing – just run `pre-commit install` to set it up, and then commit as usual going forward.
65+
Code style is enforced with `flake8` using the settings in the [`setup.cfg`](./setup.cfg) file. Run `make lint` to check. Alternately, you can use `pre-commit` to automatically run lint checks on any files you are committing: just run `pre-commit install` to set it up, and then commit as usual going forward.
6866

6967
Development
7068
-----------

doc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Building the seaborn docs
22
=========================
33

4-
Building the docs requires additional dependencies; they can be installed with `pip install seaborn[docs]`.
4+
Building the docs requires additional dependencies; they can be installed with `pip install seaborn[stats,docs]`.
55

66
The build process involves conversion of Jupyter notebooks to `rst` files. To facilitate this, you may need to set `NB_KERNEL` environment variable to the name of a kernel on your machine (e.g. `export NB_KERNEL="python3"`). To get a list of available Python kernels, run `jupyter kernelspec list`.
77

doc/_docstrings/FacetGrid.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,9 @@
280280
],
281281
"metadata": {
282282
"kernelspec": {
283-
"display_name": "seaborn-py39-latest",
283+
"display_name": "py310",
284284
"language": "python",
285-
"name": "seaborn-py39-latest"
285+
"name": "py310"
286286
},
287287
"language_info": {
288288
"codemirror_mode": {
@@ -294,7 +294,7 @@
294294
"name": "python",
295295
"nbconvert_exporter": "python",
296296
"pygments_lexer": "ipython3",
297-
"version": "3.9.13"
297+
"version": "3.10.0"
298298
}
299299
},
300300
"nbformat": 4,

doc/_docstrings/JointGrid.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@
222222
],
223223
"metadata": {
224224
"kernelspec": {
225-
"display_name": "seaborn-py39-latest",
225+
"display_name": "py310",
226226
"language": "python",
227-
"name": "seaborn-py39-latest"
227+
"name": "py310"
228228
},
229229
"language_info": {
230230
"codemirror_mode": {
@@ -236,7 +236,7 @@
236236
"name": "python",
237237
"nbconvert_exporter": "python",
238238
"pygments_lexer": "ipython3",
239-
"version": "3.9.13"
239+
"version": "3.10.0"
240240
}
241241
},
242242
"nbformat": 4,

doc/_docstrings/PairGrid.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@
249249
],
250250
"metadata": {
251251
"kernelspec": {
252-
"display_name": "seaborn-py39-latest",
252+
"display_name": "py310",
253253
"language": "python",
254-
"name": "seaborn-py39-latest"
254+
"name": "py310"
255255
},
256256
"language_info": {
257257
"codemirror_mode": {
@@ -263,7 +263,7 @@
263263
"name": "python",
264264
"nbconvert_exporter": "python",
265265
"pygments_lexer": "ipython3",
266-
"version": "3.9.13"
266+
"version": "3.10.0"
267267
}
268268
},
269269
"nbformat": 4,

doc/_docstrings/axes_style.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@
8080
],
8181
"metadata": {
8282
"kernelspec": {
83-
"display_name": "seaborn-py39-latest",
83+
"display_name": "py310",
8484
"language": "python",
85-
"name": "seaborn-py39-latest"
85+
"name": "py310"
8686
},
8787
"language_info": {
8888
"codemirror_mode": {
@@ -94,7 +94,7 @@
9494
"name": "python",
9595
"nbconvert_exporter": "python",
9696
"pygments_lexer": "ipython3",
97-
"version": "3.9.13"
97+
"version": "3.10.0"
9898
}
9999
},
100100
"nbformat": 4,

doc/_docstrings/barplot.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@
103103
],
104104
"metadata": {
105105
"kernelspec": {
106-
"display_name": "seaborn-py39-latest",
106+
"display_name": "py310",
107107
"language": "python",
108-
"name": "seaborn-py39-latest"
108+
"name": "py310"
109109
},
110110
"language_info": {
111111
"codemirror_mode": {
@@ -117,7 +117,7 @@
117117
"name": "python",
118118
"nbconvert_exporter": "python",
119119
"pygments_lexer": "ipython3",
120-
"version": "3.9.13"
120+
"version": "3.10.0"
121121
}
122122
},
123123
"nbformat": 4,
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "8f97280e-cec8-42b2-a968-4fd4364594f8",
7+
"metadata": {
8+
"tags": [
9+
"hide"
10+
]
11+
},
12+
"outputs": [],
13+
"source": [
14+
"import seaborn as sns\n",
15+
"sns.set_theme()\n",
16+
"sns.palettes._patch_colormap_display()"
17+
]
18+
},
19+
{
20+
"cell_type": "raw",
21+
"id": "972edede-df1a-4010-9674-00b864d020e2",
22+
"metadata": {},
23+
"source": [
24+
"Pass a list of two colors to interpolate between them:"
25+
]
26+
},
27+
{
28+
"cell_type": "code",
29+
"execution_count": null,
30+
"id": "e6ae2547-1042-4ac0-84ea-6f37a0229871",
31+
"metadata": {},
32+
"outputs": [],
33+
"source": [
34+
"sns.blend_palette([\"b\", \"r\"])"
35+
]
36+
},
37+
{
38+
"cell_type": "raw",
39+
"id": "1d983eac-2dd5-4746-b27f-4dfa19b5e091",
40+
"metadata": {},
41+
"source": [
42+
"The color list can be arbitrarily long, and any color format can be used:"
43+
]
44+
},
45+
{
46+
"cell_type": "code",
47+
"execution_count": null,
48+
"id": "846b78fd-30ce-4507-93f4-4274122c1987",
49+
"metadata": {},
50+
"outputs": [],
51+
"source": [
52+
"sns.blend_palette([\"#45a872\", \".8\", \"xkcd:golden\"])"
53+
]
54+
},
55+
{
56+
"cell_type": "raw",
57+
"id": "318fef32-1f83-44d9-9ff9-21fa0231b7c6",
58+
"metadata": {},
59+
"source": [
60+
"Return a continuous colormap instead of a discrete palette:"
61+
]
62+
},
63+
{
64+
"cell_type": "code",
65+
"execution_count": null,
66+
"id": "f0a05bc3-c60b-47a1-b276-d2e28a4a8226",
67+
"metadata": {},
68+
"outputs": [],
69+
"source": [
70+
"sns.blend_palette([\"#bdc\", \"#7b9\", \"#47a\"], as_cmap=True)"
71+
]
72+
},
73+
{
74+
"cell_type": "code",
75+
"execution_count": null,
76+
"id": "0473a402-0ec2-4877-81d2-ed6c57aefc77",
77+
"metadata": {},
78+
"outputs": [],
79+
"source": []
80+
}
81+
],
82+
"metadata": {
83+
"kernelspec": {
84+
"display_name": "py310",
85+
"language": "python",
86+
"name": "py310"
87+
},
88+
"language_info": {
89+
"codemirror_mode": {
90+
"name": "ipython",
91+
"version": 3
92+
},
93+
"file_extension": ".py",
94+
"mimetype": "text/x-python",
95+
"name": "python",
96+
"nbconvert_exporter": "python",
97+
"pygments_lexer": "ipython3",
98+
"version": "3.10.0"
99+
}
100+
},
101+
"nbformat": 4,
102+
"nbformat_minor": 5
103+
}

0 commit comments

Comments
 (0)