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

GitHub CI Actions for pre-commit are failing #236

Open
ceteri opened this issue Aug 7, 2023 · 3 comments · Fixed by #235
Open

GitHub CI Actions for pre-commit are failing #236

ceteri opened this issue Aug 7, 2023 · 3 comments · Fixed by #235
Labels
bug good first issue items that are good as starting points for new contributors help wanted

Comments

@ceteri
Copy link
Collaborator

ceteri commented Aug 7, 2023

I've tried upgrading the v2 actions to v3 but still get errors during pre-commit-hooks installation.

Could this be a transient error on GH?

how pre-commit/action@v2.0.0 fails:
Run pre-commit/action@v2.0.0
install pre-commit
/opt/hostedtoolcache/Python/3.11.4/x64/bin/pre-commit run --show-diff-on-failure --color=always --all-files
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/PyCQA/bandit.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Initializing environment for https://github.com/PyCQA/pylint.
[INFO] Initializing environment for https://github.com/codespell-project/codespell.
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/PyCQA/bandit.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/runner/.cache/pre-commit/repomcioqt0n/py_env-python3/bin/python', '-mpip', 'install', '.')
return code: 1
stdout:
    Processing /home/runner/.cache/pre-commit/repomcioqt0n
      Preparing metadata (setup.py): started
      Preparing metadata (setup.py): finished with status 'done'
    Collecting mypy==0.812 (from pre-commit-dummy-package==0.0.0)
      Downloading mypy-0.812-py3-none-any.whl (2.5 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5/2.5 MB 16.2 MB/s eta 0:00:00
    Collecting typed-ast<1.5.0,>=1.4.0 (from mypy==0.812->pre-commit-dummy-package==0.0.0)
      Downloading typed_ast-1.4.3.tar.gz (210 kB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 210.9/210.9 kB 28.3 MB/s eta 0:00:00
      Preparing metadata (setup.py): started
      Preparing metadata (setup.py): finished with status 'done'
    Collecting typing-extensions>=3.[7](https://github.com/DerwenAI/pytextrank/actions/runs/5775825247/job/15665802635?pr=233#step:4:8).4 (from mypy==0.812->pre-commit-dummy-package==0.0.0)
      Obtaining dependency information for typing-extensions>=3.7.4 from https://files.pythonhosted.org/packages/ec/6b/63cc3df74987c36fe2[61](https://github.com/DerwenAI/pytextrank/actions/runs/5775825247/job/15665802635?pr=233#step:4:63)57ee12e09e8f9db4de771e0f3404263117e75b95/typing_extensions-4.7.1-py3-none-any.whl.metadata
      Downloading typing_extensions-4.7.1-py3-none-any.whl.metadata (3.1 kB)
    Collecting mypy-extensions<0.5.0,>=0.4.3 (from mypy==0.812->pre-commit-dummy-package==0.0.0)
      Downloading mypy_extensions-0.4.4.tar.gz (4.2 kB)
      Preparing metadata (setup.py): started
      Preparing metadata (setup.py): finished with status 'done'
    Downloading typing_extensions-4.7.1-py3-none-any.whl (33 kB)
    Building wheels for collected packages: pre-commit-dummy-package, mypy-extensions, typed-ast
      Building wheel for pre-commit-dummy-package (setup.py): started
      Building wheel for pre-commit-dummy-package (setup.py): finished with status 'done'
      Created wheel for pre-commit-dummy-package: filename=pre_commit_dummy_package-0.0.0-py3-none-any.whl size=1120 sha256=5f71f90d3170d53f8f47b9989ea23d4bffcb0e9b0dded2bf8714da136ae3523d
      Stored in directory: /tmp/pip-ephem-wheel-cache-aw18txsx/wheels/e0/90/ab/e7761d9e2198d579e24431aebdf1673467e[62](https://github.com/DerwenAI/pytextrank/actions/runs/5775825247/job/15665802635?pr=233#step:4:64)11a2a1025aabd
      Building wheel for mypy-extensions (setup.py): started
      Building wheel for mypy-extensions (setup.py): finished with status 'done'
      Created wheel for mypy-extensions: filename=mypy_extensions-0.4.4-py2.py3-none-any.whl size=4475 sha256=b265e4939a5ea37a0c71bc36116b01e4f1a8df28d0bc733a549dbbe80ca23f33
      Stored in directory: /home/runner/.cache/pip/wheels/0d/13/cc/d2d50aa5424943b37607ddb72f60b35d[63](https://github.com/DerwenAI/pytextrank/actions/runs/5775825247/job/15665802635?pr=233#step:4:65)b48498f68f70e4be
      Building wheel for typed-ast (setup.py): started
      Building wheel for typed-ast (setup.py): finished with status 'error'
      Running setup.py clean for typed-ast
    Successfully built pre-commit-dummy-package mypy-extensions
    Failed to build typed-ast
stderr:
      error: subprocess-exited-with-error
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [26 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_[64](https://github.com/DerwenAI/pytextrank/actions/runs/5775825247/job/15665802635?pr=233#step:4:66)-cpython-311
      creating build/lib.linux-x[86](https://github.com/DerwenAI/pytextrank/actions/runs/5775825247/job/15665802635?pr=233#step:4:88)_64-cpython-311/typed_ast
      copying typed_ast/conversions.py -> build/lib.linux-x86_64-cpython-311/typed_ast
      copying typed_ast/ast3.py -> build/lib.linux-x86_64-cpython-311/typed_ast
      copying typed_ast/ast27.py -> build/lib.linux-x86_64-cpython-311/typed_ast
      copying typed_ast/__init__.py -> build/lib.linux-x86_64-cpython-311/typed_ast
      creating build/lib.linux-x86_64-cpython-311/typed_ast/tests
      copying ast3/tests/test_basics.py -> build/lib.linux-x86_64-cpython-311/typed_ast/tests
      running build_ext
      building '_ast27' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/ast27
      creating build/temp.linux-x86_64-cpython-311/ast27/Custom
      creating build/temp.linux-x86_64-cpython-311/ast27/Parser
      creating build/temp.linux-x86_64-cpython-311/ast27/Python
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/home/runner/.cache/pre-commit/repomcioqt0n/py_env-python3/include -I/opt/hostedtoolcache/Python/3.11.4/x64/include/python3.11 -c ast27/Custom/typed_ast.c -o build/temp.linux-x86_64-cpython-311/ast27/Custom/typed_ast.o
      In file included from ast27/Custom/typed_ast.c:3:
      ast27/Custom/../Include/compile.h:5:10: fatal error: code.h: No such file or directory
          5 | #include "code.h"
            |          ^~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for typed-ast
ERROR: Could not build wheels for typed-ast, which is required to install pyproject.toml-based projects

Check the log at /home/runner/.cache/pre-commit/pre-commit.log
Error: The process '/opt/hostedtoolcache/Python/3.11.4/x64/bin/pre-commit' failed with exit code 3

how pre-commit/action@v3.0.0 fails:
Run pre-commit/action@v3.0.0
Run python -m pip install pre-commit
Collecting pre-commit
  Obtaining dependency information for pre-commit from https://files.pythonhosted.org/packages/e3/b7/1d145c985d8be9729672a45b8b8113030ad60dff45dec592efc4e5f5897a/pre_commit-3.3.3-py2.py3-none-any.whl.metadata
  Downloading pre_commit-3.3.3-py2.py3-none-any.whl.metadata (1.3 kB)
Collecting cfgv>=2.0.0 (from pre-commit)
  Downloading cfgv-3.3.1-py2.py3-none-any.whl (7.3 kB)
Collecting identify>=1.0.0 (from pre-commit)
  Obtaining dependency information for identify>=1.0.0 from https://files.pythonhosted.org/packages/63/53/6e728e41c2fc620f020cff3e9c8c36f24a1b9be5e983f1bc3778e8609a34/identify-2.5.26-py2.py3-none-any.whl.metadata
  Downloading identify-2.5.26-py2.py3-none-any.whl.metadata (4.4 kB)
Collecting nodeenv>=0.11.1 (from pre-commit)
  Obtaining dependency information for nodeenv>=0.11.1 from https://files.pythonhosted.org/packages/1a/e6/6d2ead760a9ddb35e65740fd5a57e46aadd7b0c49861ab24f94812797a1c/nodeenv-1.8.0-py2.py3-none-any.whl.metadata
  Downloading nodeenv-1.8.0-py2.py3-none-any.whl.metadata (21 kB)
Collecting pyyaml>=5.1 (from pre-commit)
  Obtaining dependency information for pyyaml>=5.1 from https://files.pythonhosted.org/packages/7b/5e/efd033ab7199a0b2044dab3b9f7a4f6670e6a52c089de572e928d2873b06/PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Downloading PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)
Collecting virtualenv>=20.10.0 (from pre-commit)
  Obtaining dependency information for virtualenv>=20.10.0 from https://files.pythonhosted.org/packages/14/19/e266f07cf55155d5f45170bbe08c486d8a9a9ae17bc8983acb1c019a8dd4/virtualenv-20.24.2-py3-none-any.whl.metadata
  Downloading virtualenv-20.24.2-py3-none-any.whl.metadata (4.5 kB)
Requirement already satisfied: setuptools in /opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages (from nodeenv>=0.11.1->pre-commit) (65.5.0)
Collecting distlib<1,>=0.3.7 (from virtualenv>=20.10.0->pre-commit)
  Obtaining dependency information for distlib<1,>=0.3.7 from https://files.pythonhosted.org/packages/43/a0/9ba967fdbd55293bacfc1507f58e316f740a3b231fc00e3d86dc39bc185a/distlib-0.3.7-py2.py3-none-any.whl.metadata
  Downloading distlib-0.3.7-py2.py3-none-any.whl.metadata (5.1 kB)
Collecting filelock<4,>=3.12.2 (from virtualenv>=20.10.0->pre-commit)
  Obtaining dependency information for filelock<4,>=3.12.2 from https://files.pythonhosted.org/packages/00/45/ec3407adf6f6b5bf867a4462b2b0af27597a26bd3cd6e2534cb6ab029938/filelock-3.12.2-py3-none-any.whl.metadata
  Downloading filelock-3.12.2-py3-none-any.whl.metadata (2.7 kB)
Collecting platformdirs<4,>=3.9.1 (from virtualenv>=20.10.0->pre-commit)
  Obtaining dependency information for platformdirs<4,>=3.9.1 from https://files.pythonhosted.org/packages/14/51/fe5a0d6ea589f0d4a1b97824fb518962ad48b27cd346dcdfa2405187997a/platformdirs-3.10.0-py3-none-any.whl.metadata
  Downloading platformdirs-3.10.0-py3-none-any.whl.metadata (11 kB)
Downloading pre_commit-3.3.3-py2.py3-none-any.whl (202 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 202.8/202.8 kB 9.0 MB/s eta 0:00:00
Downloading identify-2.5.26-py2.py3-none-any.whl (98 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.8/98.8 kB 26.4 MB/s eta 0:00:00
Downloading nodeenv-1.8.0-py2.py3-none-any.whl (22 kB)
Downloading PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (757 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 757.7/757.7 kB 45.4 MB/s eta 0:00:00
Downloading virtualenv-20.24.2-py3-none-any.whl (3.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 88.0 MB/s eta 0:00:00
          creating build
          creating build/lib.linux-x86_64-cpython-311
          creating build/lib.linux-x86_64-cpython-311/typed_ast
          copying typed_ast/conversions.py -> build/lib.linux-x86_64-cpython-311/typed_ast
          copying typed_ast/ast3.py -> build/lib.linux-x86_64-cpython-311/typed_ast
          copying typed_ast/ast27.py -> build/lib.linux-x86_64-cpython-311/typed_ast
          copying typed_ast/__init__.py -> build/lib.linux-x86_64-cpython-311/typed_ast
          creating build/lib.linux-x86_64-cpython-311/typed_ast/tests
          copying ast3/tests/test_basics.py -> build/lib.linux-x86_64-cpython-311/typed_ast/tests
          running build_ext
          building '_ast27' extension
          creating build/temp.linux-x86_64-cpython-311
          creating build/temp.linux-x86_64-cpython-311/ast27
          creating build/temp.linux-x86_64-cpython-311/ast27/Custom
          creating build/temp.linux-x86_64-cpython-311/ast27/Parser
          creating build/temp.linux-x86_64-cpython-311/ast27/Python
          gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/home/runner/.cache/pre-commit/repooagyh6lx/py_env-python3/include -I/opt/hostedtoolcache/Python/3.11.4/x64/include/python3.11 -c ast27/Custom/typed_ast.c -o build/temp.linux-x86_64-cpython-311/ast27/Custom/typed_ast.o
          In file included from ast27/Custom/typed_ast.c:3:
          ast27/Custom/../Include/compile.h:5:10: fatal error: code.h: No such file or directory
              5 | #include "code.h"
                |          ^~~~~~~~
          compilation terminated.
          error: command '/usr/bin/gcc' failed with exit code 1
          [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for typed-ast
ERROR: Could not build wheels for typed-ast, which is required to install pyproject.toml-based projects

Check the log at /home/runner/.cache/pre-commit/pre-commit.log
Error: Process completed with exit code 3.

@ceteri ceteri added bug help wanted good first issue items that are good as starting points for new contributors labels Aug 7, 2023
@ceteri ceteri reopened this Aug 7, 2023
@ceteri
Copy link
Collaborator Author

ceteri commented Aug 7, 2023

for now, the CI actions for pre-commit is commented out, since the GH v3 is now archived.

need to find a replacement.

@sauravsinhaa
Copy link

when i ran textrank on jupyter there is difference in output

my querry=QueryExtractor("skydiving in dubai")
it is detect by jupyter ['dubai'.'skydiving]

it is detect by vs code ['dubai']

@jake-aft
Copy link
Contributor

jake-aft commented Sep 23, 2023

I found this that might be the same or similar ?
pre-commit 2850

From April 24th

found that this is a mypy issue, and that I should have updated the line

rev: 'v0.812' # Use the sha / tag you want to point at

to the latest revision from https://github.com/pre-commit/mirrors-mypy (currently v1.2.0).

Maybe related debian-bugs python3-typed-ast FTBFS with Python 3.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue items that are good as starting points for new contributors help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants