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

add support for alternate easyconfig parameters/templates/constants #4511

Draft
wants to merge 23 commits into
base: 5.0.x
Choose a base branch
from

Conversation

jfgrimm
Copy link
Member

@jfgrimm jfgrimm commented Apr 17, 2024

As discussed in slack, this is an alternative approach to introducing new parameters and deprecating old ones in one go. Instead, it's a multi-stage process:

  1. Introduce new names, as alternatives
  2. Do the renaming
  3. Deprecate
    This would allow is to do it iteratively across the different parameters / etc. over a series of EB 5.x releases.

#4464

To play around with this, check out the branch and modify:

  • easybuild/framework/easyconfig/parser.py:
 45 # alternate easyconfig parameters, and their non-deprecated equivalents                                                 
 46 ALTERNATE_PARAMETERS = {                                                                                                
 47     # <new_param>: <equivalent_param>,                                                                                  
 48 } 
  • easybuild/framework/easyconfig/templates.py:
164 # alternate templates, and their equivalents                                                                            
165 ALTERNATE_TEMPLATES = {                                                                                                 
166     # <new>: <equivalent_template>,                                                                                     
167 }
174 # alternate template constants, and their equivalents                                                                   
175 ALTERNATE_TEMPLATE_CONSTANTS = {                                                                                        
176     # <new_template_constant>: <equivalent_template_constant>,                                                          
177 }

@jfgrimm jfgrimm added the EasyBuild-5.0 EasyBuild 5.0 label Apr 17, 2024
@jfgrimm jfgrimm added this to the 5.0 milestone Apr 17, 2024
easybuild/framework/easyconfig/parser.py Outdated Show resolved Hide resolved
easybuild/framework/easyconfig/templates.py Outdated Show resolved Hide resolved
easybuild/framework/easyconfig/templates.py Outdated Show resolved Hide resolved
@jfgrimm
Copy link
Member Author

jfgrimm commented Apr 22, 2024

not really sure what I've done wrong, it works when you run the test in isolation...

FAIL: test_template_deprecation_and_alternate (test.framework.easyconfig.EasyConfigTest.test_template_deprecation_and_alternate)
Test deprecation of (and alternate) templates
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/runner/8eb0620a58092b2b260f5fc629e7607eac6df691/lib/python3.11/site-packages/test/framework/easyconfig.py", line 1498, in test_template_deprecation_and_alternate
    self.assertNotIn("%(" + tmpl + ")s", res)
AssertionError: '%(builddir)s' unexpectedly found in "cd %(start_dir)s && make %(namelower)s -Dbuild=%(builddir)s --with-cuda='%(cudaver)s' && echo %(alt_install_dir)s %(version_major_minor)s"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EasyBuild-5.0 EasyBuild 5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants