@@ -273,7 +273,7 @@ def find_file(filename, path=None, silent=False):
273273
274274 # TODO: Not sure what to do here
275275 if from_currsys ("!SIM.file.error_on_missing_file" ):
276- raise ValueError (msg )
276+ raise ValueError (msg )
277277
278278 return None
279279
@@ -699,14 +699,20 @@ def wrapper(*args, **kwargs):
699699
700700
701701def update_logging (capture_warnings = True ):
702- """Reload logging configuration from ``rc.__logging_config__``."""
702+ """Reload logging configuration from ``rc.__logging_config__``.
703+
704+ .. versionadded:: 0.8.0
705+ """
703706 # Need to access NestedMapping's internal dict here...
704707 dictConfig (rc .__logging_config__ )
705708 logging .captureWarnings (capture_warnings )
706709
707710
708711def log_to_file (enable = True ):
709- """Enable or disable logging to file (convenience function)."""
712+ """Enable or disable logging to file (convenience function).
713+
714+ .. versionadded:: 0.8.0
715+ """
710716 if enable :
711717 handlers = ["console" , "file" ]
712718 else :
@@ -721,11 +727,30 @@ def set_console_log_level(level="INFO"):
721727
722728 This controls what is actually printed to the console by ScopeSim.
723729 Accepted values are: DEBUG, INFO (default), WARNING, ERROR and CRITICAL.
730+
731+ .. versionadded:: 0.8.0
724732 """
725733 rc .__logging_config__ ["handlers" ]["console" ]["level" ] = level
726734 update_logging ()
727735
728736
737+ def set_inst_pkgs_path (pkg_path : Path | str ) -> None :
738+ """Set the local path for !SIM.file.local_packages_path (shortcut).
739+
740+ .. versionadded:: PLACEHOLDER_NEXT_RELEASE_VERSION
741+ """
742+ rc .__config__ ["!SIM.file.local_packages_path" ] = str (pkg_path )
743+
744+
745+ def link_irdb (irdb_path : Path | str | None = None ) -> None :
746+ """Set ``inst_pkgs`` to local clone of IRDB (convenience shortcut).
747+
748+ .. versionadded:: PLACEHOLDER_NEXT_RELEASE_VERSION
749+ """
750+ irdb_path = irdb_path or rc .__pkg_dir__ .parent .parent / "irdb"
751+ set_inst_pkgs_path (irdb_path )
752+
753+
729754def seq (start , stop , step = 1 ):
730755 """Replacement for numpy.arange modelled after R's seq function.
731756
0 commit comments