Skip to content

Allow overwriting location of site_specific directory #590

Closed

Description

@hiker

This will allow one app (e.g. lfric_atm) to use different compiler flags.

Activity

  1. added a commit that references this issue on Aug 5, 2026
  2. hiker commented on Aug 6, 2026

    @hiker
    CollaboratorAuthor

    Experiments with lfric_atm show that it is sufficient to just support importing from two different (relative) directories: first try importing Config from apps_specific/..., if that doesn't work, fall back to site_specific/....
    This way there is no change to any suites not requiring application specific settings.

    LFRic_atm can then be configured using multiple inheritance. Using site_specific the way they are already defined in lfric_core, the lfric_atm apps can use the following:

    apps_specific/target/default/config,py:

    from site_specific.default.config import Config as DefaultSiteConfig
    
    class Config(DefaultSiteConfig):
        def __init__(self):
                    super().__init__()
    

    apps_specific/target/nci_gadi/config.py:

    from site_specific.nci_gadi.config import Config as DefaultSiteConfig
    from apps_specific.default.config import Config as DefaultAppsConfig
    
    class Config(DefaultAppsConfig, DefaultSiteConfig):
        def __init__(self) -> None:
            super().__init__()
    

    This then leads to the following execution order:

    AppsConfig nci_gadi  -->
    AppsConfig default  -->
    SiteConfig nci_gadi  -->
    SiteConfig default  -->
    

    For example, setting up compiler-specific flags can be done in SiteConfig-default, then modified by SiteConfig-nci, then AppsConfig-default, finally AppsConfig-nci.

  3. added
    in progress
    on Aug 7, 2026
  4. added 4 commits that reference this issue on Aug 12, 2026
  5. added a commit that references this issue on Aug 20, 2026
  6. added a commit that references this issue on Aug 24, 2026
  7. hiker commented on Aug 25, 2026

    @hiker
    CollaboratorAuthor

    Closed in #591.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

in progress

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions