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

CI fixups #117

Merged
merged 4 commits into from
Oct 26, 2022
Merged

CI fixups #117

merged 4 commits into from
Oct 26, 2022

Conversation

darosior
Copy link
Contributor

@darosior darosior commented Oct 25, 2022

Some tweaks to make CI green. This is just temporary hacks (pinning dependencies) and should eventually be revisited by someone with more knowledge of the test suite and CI config.

@codecov
Copy link

codecov bot commented Oct 25, 2022

Codecov Report

Merging #117 (613f9d3) into master (f13612f) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #117   +/-   ##
=======================================
  Coverage   87.58%   87.58%           
=======================================
  Files          10       10           
  Lines         443      443           
  Branches       46       39    -7     
=======================================
  Hits          388      388           
  Misses         29       29           
  Partials       26       26           

@darosior
Copy link
Contributor Author

Arf, pinning mkdocs to https://github.com/mkdocs/mkdocs/releases/tag/1.2.4 didn't actually fixing. Trying to just pin jinja then.

@darosior
Copy link
Contributor Author

darosior commented Oct 25, 2022

Sigh.. So it's leading to YA error:

Run tox -e docs-ci build
GLOB sdist-make: /home/runner/work/coincurve/coincurve/setup.py
docs-ci create: /home/runner/work/coincurve/coincurve/.tox/docs-ci
docs-ci installdeps: mkdocs~=1.2.2, jinja2~=3.0.0, mkdocs-material~=7.3.1, mkdocs-minify-plugin~=0.4.1, mkdocs-git-revision-date-localized-plugin~=0.10.0, mkdocstrings~=0.16.2, pymdown-extensions~=9.0, mkdocs-material-extensions~=1.0.3, mkpatcher~=1.0.2, Pygments~=2.10.0
docs-ci inst: /home/runner/work/coincurve/coincurve/.tox/.tmp/package/1/coincurve-17.0.0.zip
docs-ci installed: asn1crypto==1.5.1,Babel==2.10.3,cffi==1.15.1,click==8.1.3,coincurve @ file:///home/runner/work/coincurve/coincurve/.tox/.tmp/package/1/coincurve-17.0.0.zip,ghp-import==2.1.0,gitdb==4.0.9,GitPython==3.1.29,htmlmin==0.1.12,importlib-metadata==5.0.0,Jinja2==3.0.3,jsmin==3.0.1,Markdown==3.4.1,MarkupSafe==2.1.1,mergedeep==1.3.4,mkdocs==1.2.4,mkdocs-autorefs==0.3.1,mkdocs-git-revision-date-localized-plugin==0.10.3,mkdocs-material==7.3.6,mkdocs-material-extensions==1.0.3,mkdocs-minify-plugin==0.4.1,mkdocstrings==0.16.2,mkpatcher==1.0.2,packaging==21.3,pycparser==2.21,Pygments==2.10.0,pymdown-extensions==9.7,pyparsing==3.0.9,python-dateutil==2.8.2,pytkdocs==0.12.0,pytz==2022.5,PyYAML==6.0,pyyaml_env_tag==0.1,six==1.16.0,smmap==5.0.0,watchdog==2.1.9,zipp==3.10.0
docs-ci run-test-pre: PYTHONHASHSEED='5424550'
docs-ci run-test: commands[0] | python -c 'import shutil; shutil.move('"'"'coincurve'"'"', '"'"'_coincurve'"'"')'
docs-ci run-test: commands[1] | python -m mkdocs build
INFO     -  Cleaning site directory
INFO     -  Building documentation to directory: /home/runner/work/coincurve/coincurve/site
ERROR    -  Error reading page 'api.md': Pymdownx Highlight requires at least Pygments 2.12+ if enabling Pygments
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/mkdocs/__main__.py", line 221, in <module>
    cli()
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/mkdocs/__main__.py", line 187, in build_command
    build.build(config.load_config(**kwargs), dirty=not clean)
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/mkdocs/commands/build.py", line 292, in build
    _populate_page(file.page, config, files, dirty)
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/mkdocs/commands/build.py", line 174, in _populate_page
    page.render(config, files)
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/mkdocs/structure/pages.py", line 174, in render
    self.content = md.convert(self.markdown)
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/markdown/core.py", line 264, in convert
    root = self.parser.parseDocument(self.lines).getroot()
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/markdown/blockparser.py", line 84, in parseDocument
    self.parseChunk(self.root, '\n'.join(lines))
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/markdown/blockparser.py", line 99, in parseChunk
    self.parseBlocks(parent, text.split('\n\n'))
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/markdown/blockparser.py", line 117, in parseBlocks
    if processor.run(parent, blocks) is not False:
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/mkdocstrings/extension.py", line 120, in run
    html, handler = self._process_block(identifier, block, heading_level)
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/mkdocstrings/extension.py", line 191, in _process_block
    rendered = handler.renderer.render(data, rendering)
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/mkdocstrings/handlers/python.py", line 94, in render
    return template.render(
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/jinja2/environment.py", line 1291, in render
    self.environment.handle_exception()
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/jinja2/environment.py", line 925, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/mkdocstrings/templates/python/material/function.html", line 25, in top-level template code
    {% filter highlight(language="python", inline=True) %}
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/mkdocstrings/handlers/rendering.py", line 109, in highlight
    result = super().highlight(src, language, inline=inline, **kwargs)
  File "/home/runner/work/coincurve/coincurve/.tox/docs-ci/lib/python3.9/site-packages/pymdownx/highlight.py", line 332, in highlight
Error:     raise RuntimeError('Pymdownx Highlight requires at least Pygments 2.12+ if enabling Pygments')
RuntimeError: Pymdownx Highlight requires at least Pygments 2.12+ if enabling Pygments
ERROR: InvocationError for command /home/runner/work/coincurve/coincurve/.tox/docs-ci/bin/python -m mkdocs build (exited with code 1)

Let's try upgrading mkdocs then!

EDIT: actually maybe i should just try upgrading Pygments too..

Copy link
Owner

@ofek ofek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ofek ofek merged commit 8a2c89d into ofek:master Oct 26, 2022
github-actions bot pushed a commit that referenced this pull request Oct 26, 2022
* ci: temporary fixup for pytest-benchmark bug

See pytest-dev/pytest#10420

* ci: upgrade mkdocs to fix jinja2 API break

* Update tox.ini

* fixed

Co-authored-by: Ofek Lev <ofekmeister@gmail.com> 8a2c89d
@darosior darosior deleted the ci_fixups branch October 26, 2022 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants