diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 832d994..32b60af 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -47,8 +47,9 @@ jobs: - name: Upload test results to Codecov if: ${{ !cancelled() }} - uses: codecov/test-results-action@v1 + uses: codecov/codecov-action@v5 with: + report_type: test_results token: ${{ secrets.CODECOV_TOKEN }} check-changes: diff --git a/pyproject.toml b/pyproject.toml index 1d7bbdc..0bc3308 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,8 +21,8 @@ keywords = ["lsst"] dependencies = [ "htcondor ==24.0.*", "lsst-ctrl-bps-htcondor>=28.2024.5000; sys_platform == 'linux'", - "lsst-pex-config", - "lsst-resources", + "lsst-pex-config >= 30.2026.300", + "lsst-resources >= 30.2026.300", "lsst-utils", ] dynamic = ["version"] diff --git a/python/lsst/ctrl/execute/allocator.py b/python/lsst/ctrl/execute/allocator.py index 4f457c7..f0a17ea 100644 --- a/python/lsst/ctrl/execute/allocator.py +++ b/python/lsst/ctrl/execute/allocator.py @@ -76,7 +76,7 @@ def __init__( self.configuration = configuration condorInfoConfig = CondorInfoConfig() - condorInfoConfig.loadFromStream(ResourcePath(condorInfoFileName).read()) + condorInfoConfig.load(condorInfoFileName) self.platform = platform @@ -164,7 +164,7 @@ def loadAllocationConfig(self, name: ResourcePathExpression, suffix): if not (name_ := ResourcePath(name)).exists(): raise RuntimeError(f"{name_} was not found.") allocationConfig = AllocationConfig() - allocationConfig.loadFromStream(name_.read()) + allocationConfig.load(name_) self.defaults["QUEUE"] = allocationConfig.platform.queue self.defaults["EMAIL_NOTIFICATION"] = allocationConfig.platform.email diff --git a/python/lsst/ctrl/execute/condorInfoConfig.py b/python/lsst/ctrl/execute/condorInfoConfig.py index 203801c..de747a9 100644 --- a/python/lsst/ctrl/execute/condorInfoConfig.py +++ b/python/lsst/ctrl/execute/condorInfoConfig.py @@ -62,7 +62,7 @@ class CondorInfoConfig(pexConfig.Config): if __name__ == "__main__": config = CondorInfoConfig() filename = find_package_file("condor-info.py") - config.loadFromStream(filename.read()) + config.load(filename) for i in config.platform: print(i) diff --git a/python/lsst/ctrl/execute/findPackageFile.py b/python/lsst/ctrl/execute/findPackageFile.py index d414211..8cac566 100644 --- a/python/lsst/ctrl/execute/findPackageFile.py +++ b/python/lsst/ctrl/execute/findPackageFile.py @@ -28,7 +28,6 @@ import os import sys -import lsst.utils from lsst.resources import ResourcePath @@ -77,21 +76,17 @@ def find_package_file(filename: str, kind: str = "config", platform: str | None home_dir = os.getenv("HOME", "~") xdg_config_home = os.getenv("XDG_CONFIG_HOME", "~/.config") - try: - platform_pkg_dir = lsst.utils.getPackageDir(f"ctrl_platform_{platform}") - except (LookupError, ValueError): - platform_pkg_dir = None file_candidates = [ ResourcePath(home_dir).join(".lsst").join(_filename), ResourcePath(xdg_config_home).join("lsst").join(_filename), - (ResourcePath(platform_pkg_dir).join("etc").join(kind).join(_filename) if platform_pkg_dir else None), ResourcePath(sys.exec_prefix).join("etc").join(kind).join(_filename), ( ResourcePath(f"resource://lsst.ctrl.platform.{platform}/etc/{kind}/{_filename}") if platform else None ), + (ResourcePath(f"eups://ctrl_platform_{platform}/{kind}/{_filename}") if platform else None), ResourcePath(f"resource://lsst.ctrl.execute/etc/{kind}/{_filename}"), ] try: diff --git a/python/lsst/ctrl/execute/libexec/allocateNodes.py b/python/lsst/ctrl/execute/libexec/allocateNodes.py index b2d8a20..1eb2dcb 100755 --- a/python/lsst/ctrl/execute/libexec/allocateNodes.py +++ b/python/lsst/ctrl/execute/libexec/allocateNodes.py @@ -71,7 +71,7 @@ def main(): # load the CondorConfig file execConfigName = find_package_file("execConfig.py", platform=platform) configuration = CondorConfig() - configuration.loadFromStream(execConfigName.read()) + configuration.load(execConfigName) # create the plugin class schedulerName = configuration.platform.scheduler diff --git a/python/lsst/ctrl/execute/qCommand.py b/python/lsst/ctrl/execute/qCommand.py index 1257d7c..5064fce 100644 --- a/python/lsst/ctrl/execute/qCommand.py +++ b/python/lsst/ctrl/execute/qCommand.py @@ -46,12 +46,12 @@ def __init__(self, platform: str): configFileName = find_package_file("condor-info.py") condorInfoConfig = CondorInfoConfig() - condorInfoConfig.loadFromStream(configFileName.read()) + condorInfoConfig.load(configFileName) configName = find_package_file("pbsConfig.py", platform=platform) allocationConfig = AllocationConfig() - allocationConfig.loadFromStream(configName.read()) + allocationConfig.load(configName) self.userName = condorInfoConfig.platform[platform].user.name