Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 NEP29: Run CI and Docs build on Python 3.11 #103

Merged
merged 7 commits into from
May 31, 2023
Merged

Conversation

weiji14
Copy link
Owner

@weiji14 weiji14 commented May 27, 2023

Run Continuous Integration tests, workflows and documentation build on Python 3.11. Need to bump spatialpandas, datashader, pyarrow, llvmlite and numba to get Python 3.11 compatible wheels.

Bumps python from 3.10.11 to 3.11.3.

Notes:

Supersedes #89 and #29.

Bumps [numba](https://github.com/numba/numba) from 0.56.4 to 0.57.0.
- [Release notes](https://github.com/numba/numba/releases)
- [Commits](numba/numba@0.56.4...0.57.0)

Also bumps llvmlite from 0.39.0 to 0.40.0. Includes Python 3.11 wheels!
@weiji14 weiji14 added this to the 0.6.x milestone May 27, 2023
@weiji14 weiji14 self-assigned this May 27, 2023
@weiji14
Copy link
Owner Author

weiji14 commented May 27, 2023

Unit tests and docs build failing with AttributeError: module 'inspect' has no attribute 'getargspec' with datashader. Traceback from https://github.com/weiji14/zen3geo/actions/runs/5096252611/jobs/9161946910?pr=103#step:5:119:

___ [doctest] zen3geo.datapipes.datashader.DatashaderRasterizerIterDataPipe ____
127     >>> dp_canvas = IterableWrapper(iterable=[canvas])
128     ...
129     >>> # Rasterize vector point geometries onto blank canvas
130     >>> dp_datashader = dp_canvas.rasterize_with_datashader(
131     ...     vector_datapipe=dp_vector
132     ... )
133     ...
134     >>> # Loop or iterate over the DataPipe stream
135     >>> it = iter(dp_datashader)
136     >>> dataarray = next(it)
UNEXPECTED EXCEPTION: AttributeError("module 'inspect' has no attribute 'getargspec'\nThis exception is thrown by __iter__ of DatashaderRasterizerIterDataPipe(agg=None, kwargs={}, source_datapipe=IterableWrapperIterDataPipe, vector_datapipe=IterableWrapperIterDataPipe)")
Traceback (most recent call last):
  File "/home/runner/.cache/pypoetry/virtualenvs/zen3geo-wNxkC0DI-py3.11/lib/python3.11/site-packages/toolz/functoolz.py", line 457, in memof
    return cache[k]
           ~~~~~^^^
KeyError: (<datashader.glyphs.points.MultiPointGeometry object at 0x7f92287e3750>, CPUDispatcher(<function LinearAxis.mapper at 0x7f92c7144720>), CPUDispatcher(<function LinearAxis.mapper at 0x7f92c7144720>), <function make_info.<locals>.<lambda> at 0x7f922895b6a0>, CPUDispatcher(<function append at 0x7f922895b920>), False)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/runner/.cache/pypoetry/virtualenvs/zen3geo-wNxkC0DI-py3.11/lib/python3.11/site-packages/datashader/glyphs/glyph.py", line 151, in _expand_aggs_and_cols
    append_args = inspect.getargspec(append.py_func).args
                  ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/doctest.py", line 1351, in __run
    exec(compile(example.source, filename, "single",
  File "<doctest zen3geo.datapipes.datashader.DatashaderRasterizerIterDataPipe[14]>", line 1, in <module>
  File "/home/runner/.cache/pypoetry/virtualenvs/zen3geo-wNxkC0DI-py3.11/lib/python3.11/site-packages/torch/utils/data/datapipes/_hook_iterator.py", line 173, in wrap_generator
    response = gen.send(None)
               ^^^^^^^^^^^^^^
  File "/home/runner/work/zen3geo/zen3geo/zen3geo/datapipes/datashader.py", line 229, in __iter__
    raster: xr.DataArray = canvas.points(
                           ^^^^^^^^^^^^^^
  File "/home/runner/.cache/pypoetry/virtualenvs/zen3geo-wNxkC0DI-py3.11/lib/python3.11/site-packages/datashader/core.py", line 219, in points
    return bypixel(source, self, glyph, agg)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.cache/pypoetry/virtualenvs/zen3geo-wNxkC0DI-py3.11/lib/python3.11/site-packages/datashader/core.py", line 1260, in bypixel
    return bypixel.pipeline(source, schema, canvas, glyph, agg, antialias=antialias)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.cache/pypoetry/virtualenvs/zen3geo-wNxkC0DI-py3.11/lib/python3.11/site-packages/datashader/utils.py", line 112, in __call__
    return lk[cls](head, *rest, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.cache/pypoetry/virtualenvs/zen3geo-wNxkC0DI-py3.11/lib/python3.11/site-packages/datashader/data_libraries/pandas.py", line 17, in pandas_pipeline
    return glyph_dispatch(glyph, df, schema, canvas, summary, antialias=antialias)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.cache/pypoetry/virtualenvs/zen3geo-wNxkC0DI-py3.11/lib/python3.11/site-packages/datashader/utils.py", line 112, in __call__
    return lk[cls](head, *rest, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.cache/pypoetry/virtualenvs/zen3geo-wNxkC0DI-py3.11/lib/python3.11/site-packages/datashader/data_libraries/pandas.py", line 31, in default
    extend = glyph._build_extend(x_mapper, y_mapper, info, append, antialias_stage_2)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.cache/pypoetry/virtualenvs/zen3geo-wNxkC0DI-py3.11/lib/python3.11/site-packages/toolz/functoolz.py", line 461, in memof
    cache[k] = result = func(*args, **kwargs)
                        ^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.cache/pypoetry/virtualenvs/zen3geo-wNxkC0DI-py3.11/lib/python3.11/site-packages/datashader/glyphs/points.py", line 235, in _build_extend
    @self.expand_aggs_and_cols(append)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.cache/pypoetry/virtualenvs/zen3geo-wNxkC0DI-py3.11/lib/python3.11/site-packages/datashader/glyphs/glyph.py", line 135, in expand_aggs_and_cols
    return self._expand_aggs_and_cols(append, self.ndims, self.antialiased)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.cache/pypoetry/virtualenvs/zen3geo-wNxkC0DI-py3.11/lib/python3.11/site-packages/datashader/glyphs/glyph.py", line 154, in _expand_aggs_and_cols
    append_args = inspect.getargspec(append).args
                  ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'
This exception is thrown by __iter__ of DatashaderRasterizerIterDataPipe(agg=None, kwargs={}, source_datapipe=IterableWrapperIterDataPipe, vector_datapipe=IterableWrapperIterDataPipe)
/home/runner/work/zen3geo/zen3geo/zen3geo/datapipes/datashader.py:136: UnexpectedException

Need to wait for datashader>=0.14.5 which contains the holoviz/datashader@b785748 patch in holoviz/datashader#1205 that changed the deprecated inspect.getargspec function to inspect.getfullargspec.

Updated actions/checkout and release-drafter/release-drafter to silence deprecated save-state (see https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands), updated pypa/gh-action-pypi-publish to use kebab-case parameters, and updated actions/setup-python for good measure too. All hashes are now followed by the version string as a comment for human readability.
Pin to numpy==1.23.* no longer needed, as datashader 0.15.0 has been released which contains patch for not using `np.warning` at holoviz/datashader#1176. Reverts a5233e4 in #98.
@weiji14 weiji14 marked this pull request as ready for review May 31, 2023 01:14
@weiji14 weiji14 mentioned this pull request May 31, 2023
13 tasks
@weiji14 weiji14 merged commit 34e7ad3 into main May 31, 2023
@weiji14 weiji14 deleted the ci-docs/python-3.11 branch May 31, 2023 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant