From 408842bf110bcb720e9aeaf47e13f77e872e8f69 Mon Sep 17 00:00:00 2001 From: Ian Harry Date: Thu, 31 Aug 2023 01:55:59 -0700 Subject: [PATCH] Revert moving ciecplib import --- .github/workflows/basic-tests.yml | 2 +- pycbc/workflow/configuration.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index 2039f8a686e..ebbfd80b85a 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -24,7 +24,7 @@ jobs: - name: installing system packages run: | sudo apt-get -o Acquire::Retries=3 update - sudo apt-get -o Acquire::Retries=3 install *fftw3* mpi intel-mkl* git-lfs graphviz libkrb5-dev + sudo apt-get -o Acquire::Retries=3 install *fftw3* mpi intel-mkl* git-lfs graphviz pip install "tox<4.0.0" pip setuptools --upgrade - name: installing auxiliary data files run: | diff --git a/pycbc/workflow/configuration.py b/pycbc/workflow/configuration.py index fe576469b34..0943e286fe3 100644 --- a/pycbc/workflow/configuration.py +++ b/pycbc/workflow/configuration.py @@ -35,11 +35,8 @@ import urllib.parse from urllib.parse import urlparse -import pycbc.libutils from pycbc.types.config import InterpolatingConfigParser -ciecplib = pycbc.libutils.import_optional('ciecplib') - # NOTE urllib is weird. For some reason it only allows known schemes and will # give *wrong* results, rather then failing, if you use something like gsiftp # We can add schemes explicitly, as below, but be careful with this! @@ -86,6 +83,10 @@ def resolve_url(url, directory=None, permissions=None, copy_to_cwd=True): shutil.copy(u.path, filename) elif u.scheme == "http" or u.scheme == "https": + # Would like to move ciecplib import to top using import_optional, but + # it needs to be available when documentation runs in the CI, and I + # can't get it to install in the GitHub CI + import ciecplib with ciecplib.Session() as s: if u.netloc in ("git.ligo.org", "code.pycbc.phy.syr.edu"): # authenticate with git.ligo.org using callback