Skip to content

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
@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"

boegel added 5 commits May 22, 2024 18:16
@jfgrimm jfgrimm marked this pull request as ready for review May 28, 2024 13:21
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

lgtm

@boegel boegel merged commit 9cc376c into easybuilders:5.0.x May 28, 2024
@jfgrimm jfgrimm mentioned this pull request Jun 13, 2024
12 tasks
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.

2 participants