@@ -249,9 +249,10 @@ def __init__(
249249 self ,
250250 tag : str ,
251251 cname : str | None ,
252- version : str ,
252+ version : str | None ,
253253 apps : Path ,
254254 core : Path ,
255+ jules : Path | None = None ,
255256 testing : bool = False ,
256257 ) -> None :
257258 self .tag : str = tag
@@ -267,7 +268,8 @@ def __init__(
267268 self .root_path : Path = apps
268269 else :
269270 self .root_path : Path = get_root_path (apps )
270- self .core_source : Path = self .get_dependency_paths (core )
271+ self .core_source : Path = self .get_dependency_paths (core , "lfric_core" )
272+ self .jules_source : Path = self .get_dependency_paths (jules , "jules" )
271273 self .set_rose_meta_path ()
272274 if version is None :
273275 self .version : str = re .search (r".*vn(\d+\.\d+)(_.*)?" , tag ).group (1 )
@@ -286,13 +288,15 @@ def __init__(
286288
287289 def set_rose_meta_path (self ) -> None :
288290 """
289- Set up the ROSE_META_PATH environment variable in order to use the Core
290- metadata. We also add the clone root path as this should allow the script to be
291- run from anywhere.
291+ Set up the ROSE_META_PATH environment variable in order to use the Core and
292+ Jules metadata. We also add the clone root path as this should allow the script
293+ to be run from anywhere.
292294 Edit 02/2026 - remove backwards compatibility support for pre central-metadata
293295 """
294296 rose_meta_path : str = (
295- f"{ self .root_path / 'rose-meta' } :{ self .core_source / 'rose-meta' } "
297+ f"{ self .root_path / 'rose-meta' } :"
298+ f"{ self .core_source / 'rose-meta' } :"
299+ f"{ self .jules_source / 'rose-meta' } "
296300 )
297301 os .environ ["ROSE_META_PATH" ] = rose_meta_path
298302
@@ -321,24 +325,23 @@ def parse_application_section(self, meta_dir: Path) -> Path:
321325 # Get Working Copy Functions
322326 ############################################################################
323327
324- def get_dependency_paths (self , source : str | None ) -> Path :
328+ def get_dependency_paths (self , source : str | None , repo : str ) -> Path :
325329 """
326- Parse the core command line arguments to get the path to a git clone.
330+ Parse the core/jules command line arguments to get the path to a git clone.
327331 If the source isn't defined, first populate the source by reading the
328332 dependencies.yaml file.
329333 If the source is a remote GitHub source clone it to a temporary location
330334 Inputs:
331335 - source, The command line argument for the source. If not set this will be
332336 None
337+ - repo, The name of the repository to clone
333338 Outputs:
334339 - The path to the source working copy to use
335340 """
336341
337- repo = "lfric_core"
338-
339342 # If source is None then read the dependencies.yaml file for the source
340343 if source is None :
341- source , ref = self .read_dependencies ()
344+ source , ref = self .read_dependencies (repo )
342345 if ":" in str (source ):
343346 source_path = Path (source .split (":" )[1 ]).expanduser ()
344347 else :
@@ -361,7 +364,7 @@ def get_dependency_paths(self, source: str | None) -> Path:
361364 source = self .git_clone_temp (source , ref , repo )
362365 return source
363366
364- def read_dependencies (self , repo : str = "lfric_core" ) -> tuple [str , str ]:
367+ def read_dependencies (self , repo : str ) -> tuple [str , str ]:
365368 """
366369 Read through the dependencies.yaml file for the source of the repo defined
367370 by repo. Uses self.root_path to locate the dependencies.yaml file.
@@ -1265,7 +1268,15 @@ def parse_args() -> argparse.Namespace:
12651268 "--core" ,
12661269 default = None ,
12671270 help = "The LFRic Core source being used."
1268- "Either a path to a working copy or a git source."
1271+ "Either a path to a local clone or a github source."
1272+ "If not set, will be read from the dependencies.yaml" ,
1273+ )
1274+ parser .add_argument (
1275+ "-j" ,
1276+ "--jules" ,
1277+ default = None ,
1278+ help = "The Jules source being used."
1279+ "Either a path to a local clone or a github source."
12691280 "If not set, will be read from the dependencies.yaml" ,
12701281 )
12711282 parser .add_argument (
@@ -1280,14 +1291,15 @@ def apply_macros_main(
12801291 version : str | None = None ,
12811292 apps : Path = Path ("." ).absolute (),
12821293 core : str | None = None ,
1294+ jules : str | None = None ,
12831295) -> None :
12841296 """
12851297 Main function for this program
12861298 """
12871299
12881300 check_environment ()
12891301
1290- macro_object : ApplyMacros = ApplyMacros (tag , cname , version , apps , core )
1302+ macro_object : ApplyMacros = ApplyMacros (tag , cname , version , apps , core , jules )
12911303
12921304 # Pre-process macros
12931305 banner_print ("Pre-Processing Macros" )
@@ -1316,4 +1328,6 @@ def apply_macros_main(
13161328
13171329if __name__ == "__main__" :
13181330 args = parse_args ()
1319- apply_macros_main (args .tag , args .cname , args .version , args .apps , args .core )
1331+ apply_macros_main (
1332+ args .tag , args .cname , args .version , args .apps , args .core , args .jules
1333+ )
0 commit comments