Repository: nf-core/tools

Issue:
Lint linter config for Python < 3.6 and issue warning if Actions are using Python 3.6 and older
### Description of the bug

```
Run nf-core -l lint_log.txt lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md
```
```python
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.15/x64/bin/nf-core", line 5, in <module>
    from nf_core.__main__ import run_nf_core
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/nf_core/__main__.py", line 19, in <module>
    import nf_core.lint
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/nf_core/lint/__init__.py", line 23, in <module>
    import nf_core.modules.lint
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/nf_core/modules/__init__.py", line 1, in <module>
    from .bump_versions import ModuleVersionBumper
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/nf_core/modules/bump_versions.py", line 24, in <module>
    from .modules_command import ModuleCommand
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/nf_core/modules/modules_command.py", line [11](https://github.com/nf-core/scrnaseq/actions/runs/3188310073/jobs/5200822519#step:6:12), in <module>
    from .modules_json import ModulesJson
  File "/opt/hostedtoolcache/Python/3.6.[15](https://github.com/nf-core/scrnaseq/actions/runs/3188310073/jobs/5200822519#step:6:16)/x64/lib/python3.6/site-packages/nf_core/modules/modules_json.py", line 15, in <module>
    import nf_core.modules.modules_repo
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/nf_core/modules/modules_repo.py", line 5, in <module>
    from importlib.resources import path
ModuleNotFoundError: No module named 'importlib.resources'
```
```
Error: Process completed with exit code 1.
```

### Command used and terminal output

```console
https://github.com/nf-core/scrnaseq/actions/runs/3188310073/jobs/5200822519
```


### System information

GHA


Discussion:
On Python 3.6, `importlib.resources` is not part of the standard library. 3.6 reached end of life a long time ago 😱 
Basically, to solve this you would need to add

```
importlib_resources; python_version <'3.7'
```

and then create imports like

```py
try:
    from importlib.resources import ...
except ImportError:
    from importlib_resources import ...
```

Or decide to not support 3.6 😛 
We already dropped support for 3.6 elsewhere, so just drop it here I think. Should be sufficient to remove it from the CI actions matrix. 
I changed the title accordingly...

![image](https://user-images.githubusercontent.com/2359510/194047285-ab67a85d-49c7-4b7c-aa48-a2367d9b11ca.png)

I've been checking, we dropped 3.6 everywhere, and we also don't use `importlib.resources` anymore. I am closing the issue :) 
Yeah, looks like it is there in `master`:
https://github.com/nf-core/tools/blob/dec66abe1c36a8975a952e1f80f045cab65bbf72/nf_core/modules/modules_repo.py#L5

But it's been removed [in `dev`](https://github.com/nf-core/tools/blob/91727f3e62ccabcff7f2ffc39c405b3bb2d31403/nf_core/modules/modules_repo.py).

However, I think that we should either:

1. Support Python 3.6 and add it back to the CI tests
2. Prevent people from installing with Python 3.6 by adding a restriction in `setup.py`

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -35,6 +35,7 @@
         "console_scripts": ["nf-core=nf_core.__main__:run_nf_core"],
         "refgenie.hooks.post_update": ["nf-core-refgenie=nf_core.refgenie:update_config"],
     },
+    python_requires=">=3.7, <4",
     install_requires=required,
     packages=find_packages(exclude=("docs")),
     include_package_data=True,


Test patch: