diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index 8c25e854e72..781ee71f0c1 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -9,7 +9,7 @@ jobs: max-parallel: 60 matrix: os: [ubuntu-20.04] - python-version: [2.7, 3.6, 3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9] test-type: [help, unittest, search, inference, docs] steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/build_venv.yml b/.github/workflows/build_venv.yml index 22b4518572a..d68ed8ca7fb 100644 --- a/.github/workflows/build_venv.yml +++ b/.github/workflows/build_venv.yml @@ -1,26 +1,26 @@ -name: docker build +name: build the LVK virtualenv -on: [push] +on: [push, pull_request] jobs: - build: + build: runs-on: ubuntu-20.04 - steps: - - + steps: + - uses: actions/checkout@v1 - - + - name: "Set up Python" uses: actions/setup-python@v1 - with: - python-version: 2.7 - - + with: + python-version: 3.8 + - env: OSG_ACCESS: "${{secrets.OSG_ACCESS}}" name: "Preparing ssh stuff" run: "bash -e tools/docker_build_prepssh.sh" - - + - env: - DOCKER_IMG: igwn/lalsuite-dev:el7 + DOCKER_IMG: igwn/base:el8 PYCBC_CONTAINER: pycbc_rhel_virtualenv DOCKER_SECURE_ENV_VARS: true name: "Creating the virtual environment" diff --git a/.github/workflows/distribution.yml b/.github/workflows/distribution.yml index 4e516707bf9..c5ea0afd8a1 100644 --- a/.github/workflows/distribution.yml +++ b/.github/workflows/distribution.yml @@ -21,7 +21,7 @@ jobs: - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BUILD: cp27-* cp36-* cp37-* cp38-* cp39-* + CIBW_BUILD: cp37-* cp38-* cp39-* - uses: actions/upload-artifact@v2 with: path: ./wheelhouse/*.whl diff --git a/.github/workflows/mac-test.yml b/.github/workflows/mac-test.yml index 873d1b869c4..52a2c59288c 100644 --- a/.github/workflows/mac-test.yml +++ b/.github/workflows/mac-test.yml @@ -9,7 +9,7 @@ jobs: max-parallel: 4 matrix: os: [macos-10.15] - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9] steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/tut-test.yml b/.github/workflows/tut-test.yml index 0a0e891af6e..b0f961c803d 100644 --- a/.github/workflows/tut-test.yml +++ b/.github/workflows/tut-test.yml @@ -9,7 +9,7 @@ jobs: max-parallel: 60 matrix: os: [ubuntu-20.04] - python-version: [2.7, 3.6, 3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9] steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} diff --git a/requirements.txt b/requirements.txt index 3514586592c..d96ab085423 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,16 +1,12 @@ # requirements for most basic library use -astropy>=2.0.3,<3.0.0; python_version <= '2.7' -astropy>=2.0.3,!=4.2.1,!=4.0.5; python_version >= '3.0' +astropy>=2.0.3,!=4.2.1,!=4.0.5 Mako>=1.0.1 decorator>=3.4.2 -scipy>=0.16.0; python_version >= '3.5' -scipy>=0.16.0,<1.3.0; python_version <= '3.4' +scipy>=0.16.0 matplotlib>=2.0.0 -numpy>=1.16.0,!=1.19.0; python_version >= '3.5' -numpy>=1.16.0,<1.17.0; python_version <= '3.4' +numpy>=1.16.0,!=1.19.0 pillow -h5py>=2.5,<=3.1.0; python_version <= '3.6' -h5py>=2.5; python_version > '3.6' +h5py>=2.5 jinja2 mpld3>=0.3 requests>=1.2.1 @@ -42,9 +38,3 @@ htchirp >= 2.0 Sphinx>=1.5.0,<2.0.0 sphinx-rtd-theme sphinxcontrib-programoutput>=0.11 - -# required due to ecosystem incompatibility with 2.7 -# and several samplers which do depend on it -# REMOVE when we drop 2.7 support or corner has a new release -# and 2.2.0 is taken removed or samplers exclude its version -corner < 2.2.0; python_version < '3.6' diff --git a/setup.py b/setup.py index a7a5e2b3148..075e62155ad 100755 --- a/setup.py +++ b/setup.py @@ -38,18 +38,14 @@ install_requires = setup_requires + ['Mako>=1.0.1', 'cython>=0.29', 'decorator>=3.4.2', - 'numpy>=1.16.0,!=1.19.0; python_version >= "3.5"', - 'numpy>=1.16.0,<1.17.0; python_version <= "2.7"', - 'scipy>=0.16.0; python_version >= "3.5"', - 'scipy>=0.16.0,<1.3.0; python_version <= "3.4"', + 'numpy>=1.16.0,!=1.19.0', + 'scipy>=0.16.0', 'matplotlib>=1.5.1', 'pillow', - 'h5py>=2.5,<=3.1.0; python_version <= "3.6"', - 'h5py>=2.5; python_version > "3.6"', + 'h5py>=2.5', 'jinja2', 'lalsuite', - 'astropy>=2.0.3,<3.0.0; python_version <= "2.7"', - 'astropy>=2.0.3,!=4.2.1,!=4.0.5; python_version > "3.0"', + 'astropy>=2.0.3,!=4.2.1,!=4.0.5', 'mpld3>=0.3', 'lscsoft-glue>=1.59.3', 'requests>=1.2.1', @@ -125,7 +121,7 @@ def __getattr__(self, attr): vinfo = _version_helper.generate_git_version_info() except: vinfo = vdummy() - vinfo.version = '1.18.dev4' + vinfo.version = '2.0.dev0' vinfo.release = 'False' with open('pycbc/version.py', 'wb') as f: @@ -301,11 +297,9 @@ def run(self): 'pycbc.results': find_files('pycbc/results'), 'pycbc.tmpltbank': find_files('pycbc/tmpltbank')}, ext_modules = ext, - python_requires='>=2.7', + python_requires='>=3.7', classifiers=[ 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', diff --git a/tools/docker_build_dist.sh b/tools/docker_build_dist.sh index 79a5bc7ec92..223fc2a1e0c 100755 --- a/tools/docker_build_dist.sh +++ b/tools/docker_build_dist.sh @@ -36,24 +36,22 @@ fi if [ "x${PYCBC_CONTAINER}" == "xpycbc_rhel_virtualenv" ]; then - ENV_OS="x86_64_rhel_7" - yum -y install python2-pip python-setuptools which - yum -y install curl - curl http://download.pegasus.isi.edu/wms/download/rhel/7/pegasus.repo > /etc/yum.repos.d/pegasus.repo + ENV_OS="x86_64_rhel_8" + yum -y install python38 python38-devel + yum -y groupinstall "Development Tools" + yum -y install which yum clean all yum makecache - yum -y install openssl-devel openssl-static - yum -y install pegasus-4.9.3 + yum -y install openssl-devel yum -y install ligo-proxy-utils - yum -y install ecp-cookie-init - yum -y install python-virtualenv + yum -y install python3-virtualenv yum -y install hdf5-static libxml2-static zlib-static libstdc++-static cfitsio-static glibc-static fftw-static gsl-static --skip-broken CVMFS_PATH=/cvmfs/oasis.opensciencegrid.org/ligo/sw/pycbc/${ENV_OS}/virtualenv mkdir -p ${CVMFS_PATH} VENV_PATH=${CVMFS_PATH}/pycbc-${SOURCE_TAG} - virtualenv ${VENV_PATH} + virtualenv -p python3.8 ${VENV_PATH} echo 'export PYTHONUSERBASE=${VIRTUAL_ENV}/.local' >> ${VENV_PATH}/bin/activate echo "export XDG_CACHE_HOME=\${HOME}/cvmfs-pycbc-${SOURCE_TAG}/.cache" >> ${VENV_PATH}/bin/activate source ${VENV_PATH}/bin/activate @@ -62,8 +60,8 @@ if [ "x${PYCBC_CONTAINER}" == "xpycbc_rhel_virtualenv" ]; then echo -e "[easy_install]\\nzip_ok = false\\n" > ${VIRTUAL_ENV}/.local/.pydistutils.cfg echo -e "\\n>> [`date`] Upgrading pip and setuptools" - pip install --upgrade pip setuptools - pip install six packaging appdirs + pip install --upgrade pip setuptools pytest + pip install six packaging appdirs mkl echo -e "\\n>> [`date`] Installing PyCBC dependencies from requirements.txt" cd /pycbc @@ -76,8 +74,12 @@ if [ "x${PYCBC_CONTAINER}" == "xpycbc_rhel_virtualenv" ]; then echo -e "\\n>> [`date`] Installing ipython and jupyter" pip install jupyter + echo -e "\\n>> [`date`] Running basic tests" + pytest + cat << EOF >> $VIRTUAL_ENV/bin/activate + # if a suitable MKL exists, set it up if [ -f /opt/intel/composer_xe_2015/mkl/bin/mklvars.sh ] ; then # location on syracuse cluster @@ -99,12 +101,6 @@ EOF deactivate - echo -e "\\n>> [`date`] Running test_coinc_search_workflow.sh" - mkdir -p /pycbc/workflow-test - pushd /pycbc/workflow-test - /pycbc/tools/test_coinc_search_workflow.sh ${VENV_PATH} ${SOURCE_TAG} - popd - if [ "x${DOCKER_SECURE_ENV_VARS}" == "xtrue" ] ; then echo -e "\\n>> [`date`] Setting virtual environment permissions for deployment" find ${VENV_PATH} -type d -exec chmod go+rx {} \;