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

Added warning for unsupported Python versions (<3.8) #1544

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ersilia/cli/create_cli.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import sys
from ..auth.auth import Auth
from .cmd import Command
from .commands import ersilia_cli


def create_ersilia_cli():
"""
Creates and configures the Ersilia CLI.
Expand All @@ -15,10 +15,13 @@ def create_ersilia_cli():
ersilia_cli : module
The configured Ersilia CLI module.
"""
# Check Python version
if sys.version_info < (3.8,):
print("\033[91mWARNING: Ersilia does not support Python versions below 3.8. Please upgrade your Python version.\033[0m")

is_contributor = Auth().is_contributor()

cmd = Command()

cmd.auth()
cmd.catalog()
cmd.uninstall()
Expand All @@ -37,7 +40,6 @@ def create_ersilia_cli():
cmd.run()

# TODO: functions only for contributors
# Functions only for contributors
if is_contributor:
cmd.setup()

Expand Down