You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The template is currently broken regarding GitHub Actions (and maybe something else as well I've forgotten since fixing it).
Describe the solution you'd like
See puttehi/slacktube#12 for what it took to fix. I have also locked to Python 3.10 everywhere in an earlier commit to main. Untested with older versions. Might require more finagling with dependencies.
In short:
Use nox-poetry as pip doesn't support poetry export format for --constraint anymore.
Use flakeheaven instead of flakehell as flakehell doesn't support newer flake8 versions and is an unmaintained, deprecated project replaced by the community fork.
Run pip install pre-commit
pip install pre-commit
pre-commit run --all-files
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.7.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.7.15/x64/lib
Collecting pre-commit
Downloading pre_commit-[2](https://github.com/puttehi/slacktube/actions/runs/3532141950/jobs/5926133006#step:4:2).20.0-py2.py[3](https://github.com/puttehi/slacktube/actions/runs/3532141950/jobs/5926133006#step:4:3)-none-any.whl (199 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.5/199.5 kB 11.3 MB/s eta 0:00:00
Collecting cfgv>=2.0.0
Downloading cfgv-3.3.1-py2.py3-none-any.whl (7.3 kB)
Collecting pyyaml>=5.1
Downloading PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_6[4](https://github.com/puttehi/slacktube/actions/runs/3532141950/jobs/5926133006#step:4:4).manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl ([5](https://github.com/puttehi/slacktube/actions/runs/3532141950/jobs/5926133006#step:4:5)9[6](https://github.com/puttehi/slacktube/actions/runs/3532141950/jobs/5926133006#step:4:6) kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 596.3/596.3 kB 5[7](https://github.com/puttehi/slacktube/actions/runs/3532141950/jobs/5926133006#step:4:7).7 MB/s eta 0:00:00
Collecting toml
Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting importlib-metadata
Downloading importlib_metadata-5.0.0-py3-none-any.whl (21 kB)
Collecting nodeenv>=0.11.1
Downloading nodeenv-1.7.0-py2.py3-none-any.whl (21 kB)
Collecting identify>=1.0.0
Downloading identify-2.5.9-py2.py3-none-any.whl (9[8](https://github.com/puttehi/slacktube/actions/runs/3532141950/jobs/5926133006#step:4:9) kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ [9](https://github.com/puttehi/slacktube/actions/runs/3532141950/jobs/5926133006#step:4:10)8.8/98.8 kB 32.4 MB/s eta 0:00:00
Collecting virtualenv>=20.0.8
Downloading virtualenv-20.16.7-py3-none-any.whl (8.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.8/8.8 MB 98.1 MB/s eta 0:00:00
Requirement already satisfied: setuptools in /opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages (from nodeenv>=0.11.1->pre-commit) (47.1.0)
Collecting distlib<1,>=0.3.6
Downloading distlib-0.3.6-py2.py3-none-any.whl (468 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.5/468.5 kB 79.6 MB/s eta 0:00:00
Collecting platformdirs<3,>=2.4
Downloading platformdirs-2.5.4-py3-none-any.whl (14 kB)
Collecting filelock<4,>=3.4.1
Downloading filelock-3.8.0-py3-none-any.whl ([10](https://github.com/puttehi/slacktube/actions/runs/3532141950/jobs/5926133006#step:4:11) kB)
Collecting typing-extensions>=3.6.4
Downloading typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting zipp>=0.5
Downloading zipp-3.10.0-py3-none-any.whl (6.2 kB)
Installing collected packages: distlib, zipp, typing-extensions, toml, pyyaml, platformdirs, nodeenv, identify, filelock, cfgv, importlib-metadata, virtualenv, pre-commit
Successfully installed cfgv-3.3.1 distlib-0.3.6 filelock-3.8.0 identify-2.5.9 importlib-metadata-5.0.0 nodeenv-1.7.0 platformdirs-2.5.4 pre-commit-2.20.0 pyyaml-6.0 toml-0.10.2 typing-extensions-4.4.0 virtualenv-20.16.7 zipp-3.10.0
Notice: A new release of pip available: 22.3 -> 22.3.1
Notice: To update, run: pip install --upgrade pip
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/timothycrosley/isort.
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for local:darglint~=1.8.0,flake8-annotations~=2.6.2,flake8-bandit~=2.1.2,flake8-blind-except~=0.2.0,flake8-bugbear~=21.9.2,flake8-builtins~=1.5.3,flake8-docstrings~=1.6.0,flake8-logging-format~=0.6.0,flake8~=3.9.2,flakehell~=0.9.0.
[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/timothycrosley/isort.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for local.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Check Toml...............................................................Passed
Check Yaml...............................................................Passed
Debug Statements (Python)................................................Passed
Check for merge conflicts................................................Passed
Check JSON...........................................(no files to check)Skipped
Fix End of Files.........................................................Passed
isort....................................................................Passed
black....................................................................Failed
- hook id: black
- exit code: 1
Traceback (most recent call last):
File "/home/runner/.cache/pre-commit/repo4vif_n5t/py_env-python3.7/bin/black", line 8, in<module>sys.exit(patched_main())
File "/home/runner/.cache/pre-commit/repo4vif_n5t/py_env-python3.7/lib/python3.7/site-packages/black/__init__.py", line [12](https://github.com/puttehi/slacktube/actions/runs/3532141950/jobs/5926133006#step:4:13)82, in patched_main
patch_click()
File "/home/runner/.cache/pre-commit/repo4vif_n5t/py_env-python3.7/lib/python3.7/site-packages/black/__init__.py", line 1268, in patch_click
from click import _unicodefun # type: ignore
ImportError: cannot import name '_unicodefun' from 'click' (/home/runner/.cache/pre-commit/repo4vif_n5t/py_env-python3.7/lib/python3.7/site-packages/click/__init__.py)
flakehell................................................................Failed
- hook id: flakehell
- exit code: 1
Traceback (most recent call last):
File "/home/runner/.cache/pre-commit/repoh_hmq108/py_env-python3.7/bin/flakehell", line 8, in<module>sys.exit(entrypoint())
File "/home/runner/.cache/pre-commit/repoh_hmq108/py_env-python3.7/lib/python3.7/site-packages/flakehell/_cli.py", line 40, in entrypoint
exit_code, msg = main(argv)
File "/home/runner/.cache/pre-commit/repoh_hmq108/py_env-python3.7/lib/python3.7/site-packages/flakehell/_cli.py", line 32, in main
return COMMANDS[command_name](argv=argv[1:])
File "/home/runner/.cache/pre-commit/repoh_hmq108/py_env-python3.7/lib/python3.7/site-packages/flakehell/commands/_lint.py", line 12, in lint_command
app.run(argv)
File "/home/runner/.cache/pre-commit/repoh_hmq108/py_env-python3.7/lib/python3.7/site-packages/flake8/main/application.py", line 363, in run
self._run(argv)
File "/home/runner/.cache/pre-commit/repoh_hmq108/py_env-python3.7/lib/python3.7/site-packages/flake8/main/application.py", line 350, in _run
self.initialize(argv)
File "/home/runner/.cache/pre-commit/repoh_hmq108/py_env-python3.7/lib/python3.7/site-packages/flake8/main/application.py", line 330, in initialize
self.find_plugins(config_finder)
File "/home/runner/.cache/pre-commit/repoh_hmq108/py_env-python3.7/lib/python3.7/site-packages/flakehell/_patched/_app.py", line [16](https://github.com/puttehi/slacktube/actions/runs/3532141950/jobs/5926133006#step:4:17)3, in find_plugins
self.check_plugins = FlakeHellCheckers(local_plugins.extension) # this line is changed
File "/home/runner/.cache/pre-commit/repoh_hmq108/py_env-python3.7/lib/python3.7/site-packages/flakehell/_patched/_plugins.py", line 67, in __init__
local_plugins=local_plugins,
File "/home/runner/.cache/pre-commit/repoh_hmq108/py_env-python3.7/lib/python3.7/site-packages/flakehell/_patched/_plugins.py", line 47, in __init__
self._load_entrypoint_plugins()
File "/home/runner/.cache/pre-commit/repoh_hmq108/py_env-python3.7/lib/python3.7/site-packages/flake8/plugins/manager.py", line [25](https://github.com/puttehi/slacktube/actions/runs/3532141950/jobs/5926133006#step:4:26)4, in _load_entrypoint_plugins
eps = importlib_metadata.entry_points().get(self.namespace, ())
AttributeError: 'EntryPoints' object has no attribute 'get'
Error: Process completed with exit code 1.
Thanks for the template though. It was fun fiddling with CI/CD things for a change :)
The text was updated successfully, but these errors were encountered:
First of all, sorry for the late response and thanks to you for taking the time to contribute to the repo with this issue.
Regarding the use of nox-poetry, it is already implemented in the develop branch.
About using flakeheaven, I haven't implemented it yet, as it is not compatible with flake8 > 5 and I am also planning to replace flake8 completely in favor of ruff.
Is your feature request related to a problem? Please describe.
The template is currently broken regarding GitHub Actions (and maybe something else as well I've forgotten since fixing it).
Describe the solution you'd like
See puttehi/slacktube#12 for what it took to fix. I have also locked to Python 3.10 everywhere in an earlier commit to
main
. Untested with older versions. Might require more finagling with dependencies.In short:
nox-poetry
aspip
doesn't supportpoetry export
format for--constraint
anymore.flakeheaven
instead offlakehell
asflakehell
doesn't support newerflake8
versions and is an unmaintained, deprecated project replaced by the community fork.Describe alternatives you've considered
poetry
Additional context
Original action after initial commit
Linting job logs
Thanks for the template though. It was fun fiddling with CI/CD things for a change :)
The text was updated successfully, but these errors were encountered: