Repository: mwaskom/seaborn (branch: maint/pandas-2.2.0-compat)
Commit date: 2024-01-21T01:27:28Z

Workflow file: .github/workflows/ci.yaml (CI)
name: CI

on:
  push:
    branches: [master, v0.*]
  pull_request:
    branches: master
  schedule:
    - cron:  '0 6 * * 1,4' # Each Monday and Thursday at 06:00 UTC
  workflow_dispatch:

permissions:
  contents: read

env:
  MPLBACKEND: Agg
  NB_KERNEL: python
  PIP_INDEX_URL: http://localhost:8629/2024-01-21
  PYDEVD_DISABLE_FILE_VALIDATION: '1'
  SEABORN_DATA: ${{ github.workspace }}/seaborn-data
  UV_INDEX_URL: http://localhost:8629/2024-01-21

jobs:
  build-docs:
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    steps:
      - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

      - name: Setup Python 3.11
        uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
        with:
          python-version: "3.11"

      - name: Install seaborn
        run: |
          pip install --upgrade pip
          pip install .[stats,docs]

      - name: Install pandoc
        run: |
          wget https://github.com/jgm/pandoc/releases/download/3.1.11/pandoc-3.1.11-1-amd64.deb
          sudo dpkg -i pandoc-3.1.11-1-amd64.deb

      - name: Cache datasets
        run: |
          git clone https://github.com/mwaskom/seaborn-data.git
          ls $SEABORN_DATA

      - name: Build docs
        env:
          SPHINXOPTS: -j `nproc`
        run: |
          cd doc
          make -j `nproc` notebooks
          make html


  run-tests:
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080

    strategy:
      matrix:
        python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
        install: [full]
        deps: [latest]

        include:
          - python: "3.8"
            install: full
            deps: pinned
          - python: "3.11"
            install: light
            deps: latest

    steps:
      - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

      - name: Setup Python ${{ matrix.python }}
        uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
        with:
          python-version: ${{ matrix.python }}
          allow-prereleases: true

      - name: Install seaborn
        run: |
          pip install --upgrade pip wheel
          if [[ ${{matrix.install}} == 'full' ]]; then EXTRAS=',stats'; fi
          if [[ ${{matrix.deps }} == 'pinned' ]]; then DEPS='-r ci/deps_pinned.txt'; fi
          pip install .[dev$EXTRAS] $DEPS

      - name: Run tests
        run: make test

      - name: Upload coverage
        uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
        if: ${{ success() }}

  lint:
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    strategy:
      fail-fast: false
    steps:

      - name: Checkout
        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

      - name: Setup Python
        uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0

      - name: Install tools
        run: pip install mypy flake8

      - name: Flake8
        run: make lint

      - name: Type checking
        run: make typecheck


Failed build logs:
step_name: run-tests (3.8, full, pinned)/5_Run tests.txt
log: ##[group]Run make test
[36;1mmake test[0m
shell: /usr/bin/bash -e {0}
env:
  NB_KERNEL: python
  MPLBACKEND: Agg
  SEABORN_DATA: /home/runner/work/seaborn/seaborn/seaborn-data
  PYDEVD_DISABLE_FILE_VALIDATION: 1
  pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib
##[endgroup]
pytest -n auto --cov=seaborn --cov=tests --cov-config=setup.cfg tests
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-7.4.4, pluggy-1.3.0
rootdir: /home/runner/work/seaborn/seaborn
configfile: pyproject.toml
plugins: xdist-3.5.0, cov-4.1.0
created: 4/4 workers
4 workers [2380 items]

........................................................................ [  3%]
........................................................................ [  6%]
........................................................................ [  9%]
........................................................................ [ 12%]
........................................................................ [ 15%]
........................................................................ [ 18%]
........................................................................ [ 21%]
........................................................................ [ 24%]
.........................................................s.............. [ 27%]
F...........................................................sss......... [ 30%]
........................................................................ [ 33%]
........................s............................................... [ 36%]
......................................................................... [ 39%]
................................ss...................................... [ 42%]
........................................................................ [ 45%]
.....................................................s.s................ [ 48%]
.....sss................................................................ [ 51%]
........................................................................ [ 54%]
s.............ss........................................................ [ 57%]
............................................................s........... [ 60%]
...ss.................................................................s. [ 63%]
..........x..................................................x.......... [ 66%]
.x................................x...x................................. [ 69%]
...................................................ss................ss. [ 72%]
........................................................................ [ 75%]
........................................................................ [ 78%]
........................................................................ [ 81%]
......................................................................... [ 84%]
..................x..................................................... [ 87%]
........................................................................ [ 90%]
........................................................................ [ 93%]
........................................................................ [ 96%]
........................................................................ [ 99%]
..                                                                       [100%]
=================================== FAILURES ===================================
_________________ TestBarPlot.test_datetime_native_scale_axis __________________
[gw3] linux -- Python 3.8.18 /opt/hostedtoolcache/Python/3.8.18/x64/bin/python

>   ???
E   KeyError: 'ME'

pandas/_libs/tslibs/offsets.pyx:3502: KeyError

The above exception was the direct cause of the following exception:

>   ???

pandas/_libs/tslibs/offsets.pyx:3604: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   ValueError: Invalid frequency: ME

pandas/_libs/tslibs/offsets.pyx:3508: ValueError

The above exception was the direct cause of the following exception:

self = <tests.test_categorical.TestBarPlot object at 0x7f2ce1dfd6d0>

    def test_datetime_native_scale_axis(self):
    
>       x = pd.date_range("2010-01-01", periods=20, freq="ME")

tests/test_categorical.py:2081: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pandas/core/indexes/datetimes.py:1069: in date_range
    dtarr = DatetimeArray._generate_range(
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pandas/core/arrays/datetimes.py:377: in _generate_range
    freq = to_offset(freq)
pandas/_libs/tslibs/offsets.pyx:3515: in pandas._libs.tslibs.offsets.to_offset
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   ValueError: Invalid frequency: ME

pandas/_libs/tslibs/offsets.pyx:3612: ValueError
=============================== warnings summary ===============================
../../../../../opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/_collections_abc.py:832: 4 warnings
tests/test_rcmod.py: 23 warnings
tests/_core/test_plot.py: 392 warnings
tests/_marks/test_bar.py: 34 warnings
tests/_marks/test_area.py: 12 warnings
tests/_marks/test_dot.py: 28 warnings
tests/_marks/test_line.py: 66 warnings
tests/_marks/test_text.py: 16 warnings
  /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/_collections_abc.py:832: MatplotlibDeprecationWarning: 
  The savefig.jpeg_quality rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
    self[key] = other[key]

tests/test_rcmod.py: 23 warnings
  /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/_collections_abc.py:832: MatplotlibDeprecationWarning: 
  The animation.avconv_args rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
    self[key] = other[key]

tests/test_rcmod.py: 23 warnings
  /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/_collections_abc.py:832: MatplotlibDeprecationWarning: 
  The animation.avconv_path rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
    self[key] = other[key]

tests/test_rcmod.py: 23 warnings
  /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/_collections_abc.py:832: MatplotlibDeprecationWarning: 
  The animation.html_args rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
    self[key] = other[key]

tests/test_rcmod.py: 23 warnings
  /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/_collections_abc.py:832: MatplotlibDeprecationWarning: 
  The keymap.all_axes rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
    self[key] = other[key]

tests/test_rcmod.py: 23 warnings
  /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/_collections_abc.py:832: MatplotlibDeprecationWarning: 
  The text.latex.preview rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
    self[key] = other[key]

tests/_core/test_plot.py::TestFacetInterface::test_layout_algo[constrained]
  /home/runner/work/seaborn/seaborn/seaborn/_core/plot.py:1002: UserWarning: There are no gridspecs with layoutgrids. Possibly did not call parent GridSpec with the "figure" keyword
    self._figure.savefig(loc, **kwargs)

tests/_core/test_scales.py::TestNominal::test_empty_data
  /home/runner/work/seaborn/seaborn/seaborn/_core/rules.py:170: DeprecationWarning: The default dtype for empty Series will be 'object' instead of 'float64' in a future version. Specify a dtype explicitly to silence this warning.
    if variable_type(pd.Series(order)) == "numeric":

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform linux, python 3.8.18-final-0 -----------
Name                               Stmts   Miss  Cover
------------------------------------------------------
seaborn/__init__.py                   16      0   100%
seaborn/_base.py                     762     19    98%
seaborn/_compat.py                    76     36    53%
seaborn/_core/__init__.py              0      0   100%
seaborn/_core/data.py                116      9    92%
seaborn/_core/exceptions.py           10      1    90%
seaborn/_core/groupby.py              54      0   100%
seaborn/_core/moves.py               109      0   100%
seaborn/_core/plot.py                827     11    99%
seaborn/_core/properties.py          422      2    99%
seaborn/_core/rules.py                63      3    95%
seaborn/_core/scales.py              502     47    91%
seaborn/_core/subplots.py            140      0   100%
seaborn/_core/typing.py               25      1    96%
seaborn/_docstrings.py                40      5    88%
seaborn/_marks/__init__.py             0      0   100%
seaborn/_marks/area.py                86      3    97%
seaborn/_marks/bar.py                123      0   100%
seaborn/_marks/base.py               132      2    98%
seaborn/_marks/dot.py                 92      0   100%
seaborn/_marks/line.py               116      0   100%
seaborn/_marks/text.py                33      0   100%
seaborn/_statistics.py               325      5    98%
seaborn/_stats/__init__.py             0      0   100%
seaborn/_stats/aggregation.py         41      1    98%
seaborn/_stats/base.py                26      1    96%
seaborn/_stats/counting.py            96      0   100%
seaborn/_stats/density.py             99      4    96%
seaborn/_stats/order.py               30      3    90%
seaborn/_stats/regression.py          23      1    96%
seaborn/_testing.py                   52      4    92%
seaborn/algorithms.py                 60      0   100%
seaborn/axisgrid.py                 1039     34    97%
seaborn/categorical.py              1208     13    99%
seaborn/distributions.py             952     34    96%
seaborn/matrix.py                    551     26    95%
seaborn/miscplot.py                   24      0   100%
seaborn/objects.py                    15      0   100%
seaborn/palettes.py                  249      1    99%
seaborn/rcmod.py                     104      0   100%
seaborn/regression.py                336     11    97%
seaborn/relational.py                287      1    99%
seaborn/utils.py                     375     14    96%
tests/__init__.py                      0      0   100%
tests/_core/__init__.py                0      0   100%
tests/_core/test_data.py             293     10    97%
tests/_core/test_groupby.py           83      0   100%
tests/_core/test_moves.py            231      0   100%
tests/_core/test_plot.py            1556     39    97%
tests/_core/test_properties.py       375      4    99%
tests/_core/test_rules.py             72      0   100%
tests/_core/test_scales.py           547      0   100%
tests/_core/test_subplots.py         368      0   100%
tests/_marks/__init__.py               0      0   100%
tests/_marks/test_area.py             84      0   100%
tests/_marks/test_bar.py             152      0   100%
tests/_marks/test_base.py            102      0   100%
tests/_marks/test_dot.py             136      0   100%
tests/_marks/test_line.py            298      0   100%
tests/_marks/test_text.py             98      1    99%
tests/_stats/__init__.py               0      0   100%
tests/_stats/test_aggregation.py      84      0   100%
tests/_stats/test_counting.py        180      0   100%
tests/_stats/test_density.py         142      3    98%
tests/_stats/test_order.py            64      1    98%
tests/_stats/test_regression.py       36      0   100%
tests/conftest.py                    107      1    99%
tests/test_algorithms.py             110      0   100%
tests/test_axisgrid.py              1314     25    98%
tests/test_base.py                  1008      3    99%
tests/test_categorical.py           2169     48    98%
tests/test_distributions.py         1526     12    99%
tests/test_docstrings.py              19      0   100%
tests/test_matrix.py                 861     28    97%
tests/test_miscplot.py                24      0   100%
tests/test_objects.py                 11      0   100%
tests/test_palettes.py               304      0   100%
tests/test_rcmod.py                  189     21    89%
tests/test_regression.py             441      6    99%
tests/test_relational.py            1213     13    99%
tests/test_statistics.py             489      2    99%
tests/test_utils.py                  382      4    99%
------------------------------------------------------
TOTAL                              24704    513    98%

=========================== short test summary info ============================
FAILED tests/test_categorical.py::TestBarPlot::test_datetime_native_scale_axis - ValueError: Invalid frequency: ME
= 1 failed, 2350 passed, 23 skipped, 6 xfailed, 692 warnings in 276.25s (0:04:36) =
make: *** [Makefile:4: test] Error 1
##[error]Process completed with exit code 2.


Changed files:
tests/test_categorical.py

Fix diff:
diff --git a/tests/test_categorical.py b/tests/test_categorical.py
index 8e5fd41d..3df78247 100644
--- a/tests/test_categorical.py
+++ b/tests/test_categorical.py
@@ -2078,7 +2078,7 @@ class TestBarPlot(SharedAggTests):
 
     def test_datetime_native_scale_axis(self):
 
-        x = pd.date_range("2010-01-01", periods=20, freq="ME")
+        x = pd.date_range("2010-01-01", periods=20, freq="MS")
         y = np.arange(20)
         ax = barplot(x=x, y=y, native_scale=True)
         assert "Date" in ax.xaxis.get_major_locator().__class__.__name__