diff --git a/doc/conf.py b/doc/conf.py index 146f5f861aaf8821575242503c3f4a35c263f920..65698cd00187de6f8c9d2054790e34c4c6850f0f 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -526,6 +526,18 @@ html_theme_options = { # Output file base name for HTML help builder. htmlhelp_basename = 'LISAdoc' +html_theme_options['announcement'] = f''' +

+ + This documentation was obtained by building the "master" git branch. LISA + project has moved to the "main" branch. Please see the + latest + documentation. + +

+ +{html_theme_options.get('announcement', '')} +''' # -- Options for LaTeX output --------------------------------------------- diff --git a/doc/sections/changes/changelog.rst b/doc/sections/changes/changelog.rst index 27fedc11c0a0e68e9434026315cf00b9a1e0dadc..294fc231221b9af76001eee4aa843261d8559094 100644 --- a/doc/sections/changes/changelog.rst +++ b/doc/sections/changes/changelog.rst @@ -2,13 +2,5 @@ Changelog ********* -.. exec:: - - from lisa.utils import LISA_HOME - from lisa._doc.helpers import make_changelog - - repo = LISA_HOME - changelog = make_changelog( - repo=LISA_HOME, - ) - print(changelog) +The changelog cannot be generated on the master branch anymore. +Please see the `latest documentation `__ diff --git a/lisa/__init__.py b/lisa/__init__.py index ccb42e0379df1974cd8701645f9ddc102ae5d724..1f718f1625d9177413193fb419e860b2b94301d2 100644 --- a/lisa/__init__.py +++ b/lisa/__init__.py @@ -13,6 +13,15 @@ import os from lisa.version import __version__ +def _warn(): + running_sphinx = bool(int(os.environ.get('_LISA_DOC_SPHINX_RUNNING', '0'))) + running_pytest = 'PYTEST_VERSION' in os.environ + if running_sphinx or running_pytest: + warnings.warn('This code was obtained by cloning the "master" git branch of LISA project. The project has moved to the "main" branch. The "master" branch will be tracking the "main" branch for a while. Please update your workflow to use the "main" branch', category=FutureWarning) + else: + raise ImportError('This code was obtained by cloning the "master" git branch of LISA project. The project has moved to the "main" branch. Please update your workflow to use the "main" branch') +_warn() + # Raise an exception when a deprecated API is used from within a lisa.* # submodule. This ensures that we don't use any deprecated APIs internally, so # they are only kept for external backward compatibility purposes. diff --git a/pytest.ini b/pytest.ini index a2731d6bfbf5f1067d8dc5ba78ef35e4c22fbf69..219648bb5debf2f14fdc4d3d298540f770c2837d 100644 --- a/pytest.ini +++ b/pytest.ini @@ -4,6 +4,8 @@ testpaths=tests # (from python-future) filterwarnings = error + # Ignore the FutureWarning about the master branch + ignore::FutureWarning:lisa ignore::DeprecationWarning:past.builtins.misc # Avoid: # .lisa-venv-3.9/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/version.py:111: in __init__ diff --git a/shell/lisa_shell b/shell/lisa_shell index 44550767559dc5f154abe3256f5711b48db5ffa5..966b082c98b124f4a1a76cbe3441c43f1ba34b79 100755 --- a/shell/lisa_shell +++ b/shell/lisa_shell @@ -529,4 +529,14 @@ fi echo "Environment variables:" env-list.py + + +printf "$LISASHELL_RED" +echo ' +================================== ATTENTION ================================== +This version of LISA was obtained by cloning the "master" git branch. +LISA project has moved to the "main" branch, please use the "main" branch. +=============================================================================== +' + # vim: set tabstop=4 shiftwidth=4 textwidth=80 expandtab: