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

remove deprecated is_generic_easyblock from easyconfig.py #4243

Merged
merged 1 commit into from
Apr 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 0 additions & 6 deletions easybuild/framework/easyconfig/easyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -1950,12 +1950,6 @@ def get_easyblock_class(easyblock, name=None, error_on_failed_import=True, error
raise EasyBuildError("Failed to obtain class for %s easyblock (not available?): %s", easyblock, err)


def is_generic_easyblock(easyblock):
"""Return whether specified easyblock name is a generic easyblock or not."""
_log.deprecated("is_generic_easyblock function was moved to easybuild.tools.filetools", '5.0')
return filetools.is_generic_easyblock(easyblock)


def get_module_path(name, generic=None, decode=True):
"""
Determine the module path for a given easyblock or software name,
Expand Down
18 changes: 1 addition & 17 deletions test/framework/easyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
from easybuild.framework.easyconfig.constants import EXTERNAL_MODULE_MARKER
from easybuild.framework.easyconfig.easyconfig import ActiveMNS, EasyConfig, create_paths, copy_easyconfigs
from easybuild.framework.easyconfig.easyconfig import det_subtoolchain_version, fix_deprecated_easyconfigs
from easybuild.framework.easyconfig.easyconfig import is_generic_easyblock, get_easyblock_class, get_module_path
from easybuild.framework.easyconfig.easyconfig import get_easyblock_class, get_module_path
from easybuild.framework.easyconfig.easyconfig import letter_dir_for, process_easyconfig, resolve_template
from easybuild.framework.easyconfig.easyconfig import triage_easyconfig_params, verify_easyconfig_filename
from easybuild.framework.easyconfig.licenses import License, LicenseGPLv3
Expand Down Expand Up @@ -3751,22 +3751,6 @@ def test_get_paths_for(self):
if env_eb_script_path:
os.environ['EB_SCRIPT_PATH'] = env_eb_script_path

def test_is_generic_easyblock(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also being tested via test/framework/filetools.py, so indeed OK to remove 👍

"""Test for is_generic_easyblock function."""

# is_generic_easyblock in easyconfig.py is deprecated, moved to filetools.py
self.allow_deprecated_behaviour()

self.mock_stderr(True)

for name in ['Binary', 'ConfigureMake', 'CMakeMake', 'PythonPackage', 'JAR']:
self.assertTrue(is_generic_easyblock(name))

for name in ['EB_bzip2', 'EB_DL_underscore_POLY_underscore_Classic', 'EB_GCC', 'EB_WRF_minus_Fire']:
self.assertFalse(is_generic_easyblock(name))

self.mock_stderr(False)

def test_get_module_path(self):
"""Test get_module_path function."""
self.assertEqual(get_module_path('EB_bzip2', generic=False), 'easybuild.easyblocks.bzip2')
Expand Down