From 5fde79699e41e966a81cb692a9568240b8cca698 Mon Sep 17 00:00:00 2001 From: Theodore Kisner Date: Wed, 29 Sep 2021 16:14:31 -0700 Subject: [PATCH] Update package name to toast from toast-cmb. (#488) * Update package name to toast from toast-cmb. * Update authors * Add local linux test script for cibuildwheel --- .github/workflows/wheels.yml | 16 ++++++++-------- AUTHORS | 2 ++ docs/changes.rst | 2 +- docs/install.rst | 14 +++++++++----- setup.py | 2 +- src/toast/RELEASE | 2 +- wheels/test_local_cibuildwheel.sh | 19 +++++++++++++++++++ 7 files changed, 41 insertions(+), 16 deletions(-) create mode 100755 wheels/test_local_cibuildwheel.sh diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 76791d9cd..c0db2f7a6 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -2,16 +2,16 @@ name: Test Binary Wheels # Uncomment here for testing and comment out schedule below. -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] +# on: +# push: +# branches: [ master ] +# pull_request: +# branches: [ master ] # Uncomment here for production and comment out push / PR above. -# on: -# schedule: -# - cron: '0 4 * * *' +on: + schedule: + - cron: '0 4 * * *' jobs: sdist: diff --git a/AUTHORS b/AUTHORS index fd9cf1d44..78bd6e61c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,3 +2,5 @@ Theodore Kisner Reijo Keskitalo Andrea Zonca Giuseppe Puglisi +Nestor Demeure +Kolen Cheung diff --git a/docs/changes.rst b/docs/changes.rst index 74b9caf0a..881302001 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -3,7 +3,7 @@ Change Log ------------------------- -2.3.13 (2021-09-23) +2.3.13 (2021-09-29) ~~~~~~~~~~~~~~~~~~~~~~~~~ * Add support for generating observation matrices (PR `#374`_). diff --git a/docs/install.rst b/docs/install.rst index cef28f05d..bc23cadb2 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -21,7 +21,7 @@ If you want to use TOAST at NERSC, see :ref:`nersc`. Pip Binary Wheels ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you already have a newer Python3 (>= 3.6), then you can install pre-built TOAST +If you already have a newer Python3 (>= 3.7), then you can install pre-built TOAST packages from PyPI. You should always use virtualenv or similar tools to manage your python environments rather than pip-installing packages as root. @@ -38,7 +38,7 @@ On Redhat / Centos we need to take extra steps to install a recent python3:: scl enable rh-python36 bash On MacOS, you can use homebrew or macports to install a recent python3. Now verify that -your python is at least 3.6:: +your python is at least 3.7:: python3 --version @@ -55,10 +55,14 @@ install more recent wheels from PyPI:: python3 -m pip install --upgrade pip -Next, use pip to install toast and its requirements (note that the name of the package -is "toast-cmb" on PyPI):: +Next, use pip to install toast and its requirements:: - pip install toast-cmb + pip install toast + +.. warning:: + As of version 2.3.13, the package name on PyPI is "toast" instead of "toast-cmb". + If you think you may have an old version of toast with the previous name installed, + then do "pip uninstall toast-cmb" before installing toast. At this point you have toast installed and you can use it from serial scripts and notebooks. If you want to enable effective parallelism with toast (useful if you diff --git a/setup.py b/setup.py index cc145458f..c50522c33 100644 --- a/setup.py +++ b/setup.py @@ -234,7 +234,7 @@ def readme(): conf = dict() -conf["name"] = "toast-cmb" +conf["name"] = "toast" conf["description"] = "Time Ordered Astrophysics Scalable Tools" conf["long_description"] = readme() conf["long_description_content_type"] = "text/markdown" diff --git a/src/toast/RELEASE b/src/toast/RELEASE index 5fe22815a..556420078 100644 --- a/src/toast/RELEASE +++ b/src/toast/RELEASE @@ -1 +1 @@ -2.3.13a1 +2.3.13rc1 diff --git a/wheels/test_local_cibuildwheel.sh b/wheels/test_local_cibuildwheel.sh new file mode 100755 index 000000000..5fe36c86f --- /dev/null +++ b/wheels/test_local_cibuildwheel.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Before running this from the toast git checkout directory, +# you shoul pip install cibuildwheel + +export CIBW_BUILD="cp38-manylinux_x86_64" +export CIBW_MANYLINUX_X86_64_IMAGE="manylinux2010" +export CIBW_BUILD_VERBOSITY=3 +export CIBW_ENVIRONMENT_LINUX="TOAST_BUILD_BLAS_LIBRARIES='-lopenblas -fopenmp -lm -lgfortran' TOAST_BUILD_LAPACK_LIBRARIES='-lopenblas -fopenmp -lm -lgfortran' TOAST_BUILD_CMAKE_VERBOSE_MAKEFILE=ON" +export CIBW_BEFORE_BUILD_LINUX=./wheels/install_deps_linux.sh +export CIBW_BEFORE_TEST="pip3 install numpy && pip3 install mpi4py" +export CIBW_TEST_COMMAND="export OMP_NUM_THREADS=2; python -c 'import toast.tests; toast.tests.run()'" + +# Get the current date for logging +now=$(date "+%Y-%m-%d_%H:%M:%S") + +# Run it +cibuildwheel --platform linux --archs x86_64 --output-dir wheelhouse . 2>&1 | tee log_${now} +