- 
                Notifications
    You must be signed in to change notification settings 
- Fork 80
ENH: implement variables substitution in configuration #488
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
base: main
Are you sure you want to change the base?
Conversation
da08d99    to
    a51d22b      
    Compare
  
    7a1e526    to
    5fcf9e1      
    Compare
  
    | @rgommers This is now working. We would just need to plug in a function to compute  | 
e12bd1f    to
    58bba11      
    Compare
  
    | This is looking interesting, thanks! For          if args.parallel is None:
            # Use number of physical cores rather than ninja's default of 2N+2,
            # to avoid out of memory issues (see gh-17941 and gh-18443)
            n_cores = cpu_count(only_physical_cores=True)
            cmd += [f"-j{n_cores}"]
        else:
            cmd += ["-j", str(args.parallel)] | 
| It seems that SciPy uses only the physical cores, thus I'll be temped to implement only that for now, and implement logical core detection only if someone asks for it. WDYT? | 
| Yes, I think that sounds good. It'd be good to get the feedback/reasons in case someone needs more than physical cores. To plug in the function, I think taking the  | 
| Can we do that from a licensing point of view?  | 
| Those licenses are compatible, so there's no problem there. Technically yes, we'd have to carry over the license text and mark that part of the code as having a BSD-3 license. If it's only a few lines of code you typically wouldn't bother, but here it's >200 LoC. So probably best done in a separate file with its own SPDX header and a copy of the full license text of Loky. (I'm the author of any modifications in SciPy, so I can relicense those for use as MIT in meson-python). | 
| I was thinking to do just that, I just wanted to make sure that it is ok to include some BSD code in  | 
| Great. And yes, should be fine. | 
| Do you have a preference for  The only practical difference I can see is that the first allows to specify a type for type conversion so New-style formatting is more expressive and would allow things like accessing attributes of the defined variables (not that it makes sense for integer variables as we are considering here) but it would be useful if we reuse the same mechanism for #29. On the other hand, with the Python AST based approach, we can implement that easily on top of the  I'm leaning toward template strings and adding the  | 
| Template strings sounds good to me, or otherwise new-style formatting.  
 | 
| 
 It depend on whether we are designing this as a generic facility or something that will only work with integer variables. I think it is worth to keep it generic (I think that the solution for #29 could be based on a similar mechanism, for example) thus forcing all variables to be integers does not seem right. Having a way to decide which variables should be coerced to int and which should not seems unnecessarily complicated. | 
| Okay, that seems like a good reason -  I'm happy with  | 
000ab53    to
    5c6ea12      
    Compare
  
    5c6ea12    to
    3e41feb      
    Compare
  
    
No description provided.