Skip to content

Commit

Permalink
Fix CI: EB_toy_deprecated needs to be in a seperate file
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoldeman committed Dec 4, 2024
1 parent e3f5a61 commit 40b4b22
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 10 deletions.
12 changes: 12 additions & 0 deletions test/framework/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
| | |-- DeprecatedDummyExtension
| | | |-- ChildDeprecatedDummyExtension
| |-- EB_toy
| | |-- EB_toy_deprecated
| | |-- EB_toy_eula
| | |-- EB_toytoy
| |-- Toy_Extension
Expand All @@ -78,6 +79,7 @@
| | |-- DeprecatedDummyExtension
| | | |-- ChildDeprecatedDummyExtension
| |-- EB_toy
| | |-- EB_toy_deprecated
| | |-- EB_toy_eula
| | |-- EB_toytoy
| |-- Toy_Extension""" # noqa
Expand All @@ -104,6 +106,7 @@
| | |-- DeprecatedDummyExtension (easybuild.easyblocks.generic.deprecateddummyextension @ %(topdir)s/generic/deprecateddummyextension.py)
| | | |-- ChildDeprecatedDummyExtension (easybuild.easyblocks.generic.childdeprecateddummyextension @ %(topdir)s/generic/childdeprecateddummyextension.py)
| |-- EB_toy (easybuild.easyblocks.toy @ %(topdir)s/t/toy.py)
| | |-- EB_toy_deprecated (easybuild.easyblocks.toy_deprecated @ %(topdir)s/t/toy_deprecated.py)
| | |-- EB_toy_eula (easybuild.easyblocks.toy_eula @ %(topdir)s/t/toy_eula.py)
| | |-- EB_toytoy (easybuild.easyblocks.toytoy @ %(topdir)s/t/toytoy.py)
| |-- Toy_Extension (easybuild.easyblocks.generic.toy_extension @ %(topdir)s/generic/toy_extension.py)
Expand All @@ -118,6 +121,7 @@
| | |-- DeprecatedDummyExtension (easybuild.easyblocks.generic.deprecateddummyextension @ %(topdir)s/generic/deprecateddummyextension.py)
| | | |-- ChildDeprecatedDummyExtension (easybuild.easyblocks.generic.childdeprecateddummyextension @ %(topdir)s/generic/childdeprecateddummyextension.py)
| |-- EB_toy (easybuild.easyblocks.toy @ %(topdir)s/t/toy.py)
| | |-- EB_toy_deprecated (easybuild.easyblocks.toy_deprecated @ %(topdir)s/t/toy_deprecated.py)
| | |-- EB_toy_eula (easybuild.easyblocks.toy_eula @ %(topdir)s/t/toy_eula.py)
| | |-- EB_toytoy (easybuild.easyblocks.toytoy @ %(topdir)s/t/toytoy.py)
| |-- Toy_Extension (easybuild.easyblocks.generic.toy_extension @ %(topdir)s/generic/toy_extension.py)""" # noqa
Expand Down Expand Up @@ -157,6 +161,7 @@
* EB_toy
* EB_toy_deprecated
* EB_toy_eula
* EB_toytoy
Expand All @@ -183,6 +188,7 @@
* EB_toy
* EB_toy_deprecated
* EB_toy_eula
* EB_toytoy
Expand Down Expand Up @@ -225,6 +231,7 @@
* EB_toy (easybuild.easyblocks.toy @ %(topdir)s/t/toy.py)
* EB_toy_deprecated (easybuild.easyblocks.toy_deprecated @ %(topdir)s/t/toy_deprecated.py)
* EB_toy_eula (easybuild.easyblocks.toy_eula @ %(topdir)s/t/toy_eula.py)
* EB_toytoy (easybuild.easyblocks.toytoy @ %(topdir)s/t/toytoy.py)
Expand All @@ -251,6 +258,7 @@
* EB_toy (easybuild.easyblocks.toy @ %(topdir)s/t/toy.py)
* EB_toy_deprecated (easybuild.easyblocks.toy_deprecated @ %(topdir)s/t/toy_deprecated.py)
* EB_toy_eula (easybuild.easyblocks.toy_eula @ %(topdir)s/t/toy_eula.py)
* EB_toytoy (easybuild.easyblocks.toytoy @ %(topdir)s/t/toytoy.py)
Expand Down Expand Up @@ -280,6 +288,7 @@
- DeprecatedDummyExtension
- ChildDeprecatedDummyExtension
- EB_toy
- EB_toy_deprecated
- EB_toy_eula
- EB_toytoy
- Toy_Extension
Expand All @@ -294,6 +303,7 @@
- DeprecatedDummyExtension
- ChildDeprecatedDummyExtension
- EB_toy
- EB_toy_deprecated
- EB_toy_eula
- EB_toytoy
- Toy_Extension""" # noqa
Expand All @@ -320,6 +330,7 @@
- DeprecatedDummyExtension (easybuild.easyblocks.generic.deprecateddummyextension @ %(topdir)s/generic/deprecateddummyextension.py)
- ChildDeprecatedDummyExtension (easybuild.easyblocks.generic.childdeprecateddummyextension @ %(topdir)s/generic/childdeprecateddummyextension.py)
- EB_toy (easybuild.easyblocks.toy @ %(topdir)s/t/toy.py)
- EB_toy_deprecated (easybuild.easyblocks.toy_deprecated @ %(topdir)s/t/toy_deprecated.py)
- EB_toy_eula (easybuild.easyblocks.toy_eula @ %(topdir)s/t/toy_eula.py)
- EB_toytoy (easybuild.easyblocks.toytoy @ %(topdir)s/t/toytoy.py)
- Toy_Extension (easybuild.easyblocks.generic.toy_extension @ %(topdir)s/generic/toy_extension.py)
Expand All @@ -334,6 +345,7 @@
- DeprecatedDummyExtension (easybuild.easyblocks.generic.deprecateddummyextension @ %(topdir)s/generic/deprecateddummyextension.py)
- ChildDeprecatedDummyExtension (easybuild.easyblocks.generic.childdeprecateddummyextension @ %(topdir)s/generic/childdeprecateddummyextension.py)
- EB_toy (easybuild.easyblocks.toy @ %(topdir)s/t/toy.py)
- EB_toy_deprecated (easybuild.easyblocks.toy_deprecated @ %(topdir)s/t/toy_deprecated.py)
- EB_toy_eula (easybuild.easyblocks.toy_eula @ %(topdir)s/t/toy_eula.py)
- EB_toytoy (easybuild.easyblocks.toytoy @ %(topdir)s/t/toytoy.py)
- Toy_Extension (easybuild.easyblocks.generic.toy_extension @ %(topdir)s/generic/toy_extension.py)""" # noqa
Expand Down
5 changes: 3 additions & 2 deletions test/framework/easyblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,9 @@ def test_post_processing_step(self):
test_ecs_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'easyconfigs', 'test_ecs')
toy_ec_fn = os.path.join(test_ecs_dir, 't', 'toy', 'toy-0.0-gompi-2018a-test.eb')

# this import only works here, since EB_toy is a test easyblock
from easybuild.easyblocks.toy import EB_toy, EB_toy_deprecated
# these imports only work here, since EB_toy is a test easyblock
from easybuild.easyblocks.toy import EB_toy
from easybuild.easyblocks.toy_deprecated import EB_toy_deprecated

cwd = os.getcwd()
toy_ec = EasyConfig(toy_ec_fn)
Expand Down
8 changes: 0 additions & 8 deletions test/framework/sandbox/easybuild/easyblocks/t/toy.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,3 @@ def make_module_extra(self):
txt = super(EB_toy, self).make_module_extra()
txt += self.module_generator.set_environment('TOY', os.getenv('TOY', '<TOY_env_var_not_defined>'))
return txt


class EB_toy_deprecated(EB_toy):
"""Support for building/installing toy with deprecated post_install step."""

def post_install_step(self):
"""Any postprocessing for toy (deprecated)"""
super(EB_toy, self).post_install_step()
39 changes: 39 additions & 0 deletions test/framework/sandbox/easybuild/easyblocks/t/toy_deprecated.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
##
# Copyright 2009-2024 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (FWO) (http://www.fwo.be/en)
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
#
# https://github.com/easybuilders/easybuild
#
# EasyBuild is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation v2.
#
# EasyBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
##
"""
(deprecated) EasyBuild support for building and installing toy, implemented as an easyblock
@author: Bart Oldeman (McGill University, Calcul Quebec, Digital Research Alliance of Canada)
"""

from easybuild.easyblocks.toy import EB_toy


class EB_toy_deprecated(EB_toy):
"""Support for building/installing toy with deprecated post_install step."""

def post_install_step(self):
"""Any postprocessing for toy (deprecated)"""
super(EB_toy, self).post_install_step()

0 comments on commit 40b4b22

Please sign in to comment.