Skip to content

Commit

Permalink
Merge pull request #734 from glotzerlab/release/2.5.0
Browse files Browse the repository at this point in the history
Release/2.5.0
  • Loading branch information
bdice authored Mar 23, 2021
2 parents 6d1b0d5 + 42ccb1b commit 8151715
Show file tree
Hide file tree
Showing 14 changed files with 95 additions and 57 deletions.
42 changes: 26 additions & 16 deletions .circleci/deploy-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,18 @@ if [ -z $1 ]; then
fi

# Build TBB
git clone https://github.com/intel/tbb.git
cd tbb
cd ~/
git clone https://github.com/oneapi-src/oneTBB.git
cd oneTBB
mkdir -p build
cd build
cmake ../ -DTBB_TEST=OFF
make
BUILD_DIR=$(find build -name linux*release)
cmake -DCOMPONENT=runtime -P cmake_install.cmake
cmake -DCOMPONENT=devel -P cmake_install.cmake
BUILD_DIR=$(dirname $(find . -name vars.sh))
cd ${BUILD_DIR}
source tbbvars.sh
source vars.sh
cd ~/

# Build wheels for Python 3.6, 3.7, 3.8, 3.9
Expand All @@ -44,18 +50,17 @@ for PYBIN in $PYBINS; do
# Need to export the current bin path so that scikit-build can find the pip
# installed cmake binary.
export PATH=${PYBIN}:${PATH}
"${PYBIN}/python" -m pip install cython scikit-build cmake --ignore-installed -q --progress-bar=off
rm -rf numpy-1.14.6
curl -sSLO https://github.com/numpy/numpy/archive/v1.14.6.tar.gz
tar -xzf v1.14.6.tar.gz
cd numpy-1.14.6
rm -f numpy/random/mtrand/mtrand.c
rm -f PKG-INFO
"${PYBIN}/python" -m pip install . --no-deps --ignore-installed -v --progress-bar=off -q
"${PYBIN}/python" -m pip install cython scikit-build cmake oldest-supported-numpy --ignore-installed -q --progress-bar=off
"${PYBIN}/pip" wheel ~/ci/freud/ -w ~/wheelhouse/ --no-deps --no-build-isolation --no-use-pep517
done

# Update RPath for wheels
# Install patched auditwheel (fixes RPATHs for libfreud/libtbb, issue #136).
cd ~/
git clone https://github.com/pypa/auditwheel.git -b master auditwheel
cd auditwheel
/opt/_internal/tools/bin/pip install -e .

# Update RPATH for wheels
for whl in ~/wheelhouse/freud*.whl; do
auditwheel repair "$whl" -w ~/ci/freud/wheelhouse/
done
Expand All @@ -65,9 +70,14 @@ for PYBIN in $PYBINS; do
echo "Testing for $(${PYBIN}/python --version)"

"${PYBIN}/python" -m pip install freud_analysis --no-deps --no-index -f ~/ci/freud/wheelhouse
"${PYBIN}/python" -m pip install -U -r ~/ci/freud/requirements/requirements-test.txt --progress-bar=off
cd ~/ci/freud/tests
"${PYBIN}/python" -m unittest discover . -v
if [[ $("${PYBIN}/python" --version 2>&1) == *"3.6."* ]]; then
# Python 3.6 is only supported with oldest requirements
"${PYBIN}/python" -m pip install -U -r ~/ci/freud/.circleci/ci-oldest-reqs.txt --progress-bar=off
else
"${PYBIN}/python" -m pip install -U -r ~/ci/freud/requirements/requirements-test.txt --progress-bar=off
fi
cd ~/ci/freud/tests/
"${PYBIN}/python" -m pytest . -v
done

# Build source distribution using whichever Python appears last
Expand Down
43 changes: 23 additions & 20 deletions .circleci/deploy-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,25 @@ export MACOSX_DEPLOYMENT_TARGET=10.12
# tries to delete them again and causes errors. To avoid this issue, we update
# manually here for the current main version of Python (required by pyenv).
brew upgrade [email protected]
brew install cmake
brew install pyenv
eval "$(pyenv init -)"
# Check supported versions with pyenv install --list
PY_VERSIONS=(3.6.12 3.7.9 3.8.6 3.9.0)
PY_VERSIONS=(3.6.13 3.7.10 3.8.7 3.9.1)

# Build TBB
git clone https://github.com/intel/tbb.git
cd tbb
cd ~/
git clone https://github.com/oneapi-src/oneTBB.git
cd oneTBB
mkdir -p build
cd build
cmake ../ -DTBB_TEST=OFF
make
BUILD_DIR=$(find build -name mac*release)
cmake -DCOMPONENT=runtime -P cmake_install.cmake
cmake -DCOMPONENT=devel -P cmake_install.cmake
BUILD_DIR=$(dirname $(find . -name vars.sh))
cd ${BUILD_DIR}
source tbbvars.sh
source vars.sh
# Force the TBB path to use an absolute path to itself for others to find.
install_name_tool -id "${PWD}/libtbb.dylib" libtbb.dylib
cd ~/
Expand All @@ -56,20 +63,11 @@ for VERSION in ${PY_VERSIONS[@]}; do
pyenv global ${VERSION}

pip install --upgrade pip
pip install cython scikit-build cmake --ignore-installed -q --progress-bar=off
rm -rf numpy-1.14.6
curl -sSLO https://github.com/numpy/numpy/archive/v1.14.6.tar.gz
tar -xzf v1.14.6.tar.gz
cd numpy-1.14.6
rm -f numpy/random/mtrand/mtrand.c
rm -f PKG-INFO
pip install . --no-deps --ignore-installed -v -q --progress-bar=off

pip install wheel delocate --progress-bar=off
pip install cython scikit-build cmake oldest-supported-numpy wheel delocate --ignore-installed -q --progress-bar=off
pip wheel ~/ci/freud/ -w ~/wheelhouse/ --no-deps --no-build-isolation --no-use-pep517
done

# Update RPath for wheels
# Update RPATH for wheels
for whl in ~/wheelhouse/freud*.whl; do
delocate-wheel "$whl" -w ~/ci/freud/wheelhouse/
done
Expand All @@ -80,10 +78,15 @@ for VERSION in ${PY_VERSIONS[@]}; do
pyenv global ${VERSION}

pip install freud_analysis --no-deps --no-index -f ~/ci/freud/wheelhouse
# Don't install MDAnalysis and skip the relevant tests.
cat ~/ci/freud/requirements/requirements-test.txt | grep -v MDAnalysis | xargs -n 1 pip install -U --progress-bar=off
cd ~/ci/freud/tests
python -m unittest discover . -v
if [[ $(python --version 2>&1) == *"3.6."* ]]; then
# Python 3.6 is only supported with oldest requirements
pip install -U -r ~/ci/freud/.circleci/ci-oldest-reqs.txt --progress-bar=off --no-use-pep517 --no-build-isolation
else
# Don't install MDAnalysis and skip the relevant tests
cat ~/ci/freud/requirements/requirements-test.txt | grep -v MDAnalysis | xargs -n 1 pip install -U --progress-bar=off --no-use-pep517 --no-build-isolation
fi
cd ~/ci/freud/tests/
python -m pytest . -v
done

pip install --user twine
Expand Down
5 changes: 3 additions & 2 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ Mayank Agrawal <[email protected]> Mayank Agrawal <[email protected].
Mayank Agrawal <[email protected]> Mayank Agrawal <[email protected]>
Jens Glaser <[email protected]> Jens-Steffen Glaser <[email protected]>
Bryan VanSaders <[email protected]> Bryan Vansaders <[email protected]>
Tim Moore <[email protected]> Timothy Moore <[email protected]>
Tim Moore <[email protected]> mootimot <[email protected]>
Tim Moore <[email protected]> Timothy Moore <[email protected]>
Tim Moore <[email protected]> mootimot <[email protected]>
Tim Moore <[email protected]> Tim Moore <[email protected]>
Andrew Karas <[email protected]> Andrew Karas <[email protected]>
Andrew Karas <[email protected]> Andrew <[email protected]>
Alex Dutton <[email protected]> alxdttn <[email protected]>
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,7 @@ set(ignoreMe "${SKBUILD}")

add_subdirectory(cpp)
add_subdirectory(freud)

if(_using_conda)
set_target_properties(libfreud PROPERTIES INSTALL_RPATH_USE_LINK_PATH True)
endif()
2 changes: 1 addition & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The format is based on
and this project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## v2.5.0 - 2021-03-xx
## v2.5.0 - 2021-03-16

### Changed
* NeighborList `filter` method has been optimized.
Expand Down
8 changes: 4 additions & 4 deletions contributors.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
2066 Vyas Ramasubramani <[email protected]>
1773 Bradley Dice <[email protected]>
1862 Bradley Dice <[email protected]>
1030 Eric Harper <[email protected]>
456 Jin Soo Ihm <[email protected]>
278 Joshua A. Anderson <[email protected]>
281 Joshua A. Anderson <[email protected]>
240 Matthew Spellings <[email protected]>
159 Kelly Wang <[email protected]>
110 Erin Teich <[email protected]>
Expand All @@ -12,13 +12,13 @@
41 Yezhi Jin <[email protected]>
40 Antonio Osorio <[email protected]>
35 Michael Stryk <[email protected]>
35 dependabot <dependabot[bot]@users.noreply.github.com>
31 Richmond Newman <[email protected]>
30 Tommy Waltmann <[email protected]>
25 Carl Simon Adorf <[email protected]>
22 Jens Glaser <[email protected]>
17 dependabot <dependabot[bot]@users.noreply.github.com>
14 Tim Moore <[email protected]>
13 Pavel Buslaev <[email protected]>
12 Tim Moore <[email protected]>
10 Benjamin Schultz <[email protected]>
10 Bryan VanSaders <[email protected]>
10 Matt Palathingal <[email protected]>
Expand Down
5 changes: 3 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
# built documents.
#
# version and release are set the same for this package.
version = "2.4.1"
release = "2.4.1"
version = "2.5.0"
release = "2.5.0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -319,6 +319,7 @@
"garnett": ("https://garnett.readthedocs.io/en/stable/", None),
"MDAnalysis": ("https://docs.mdanalysis.org/stable", None),
"ovito": ("https://www.ovito.org/docs/current/python/", None),
"pytest": ("https://docs.pytest.org/en/stable", None),
}

autodoc_default_options = {
Expand Down
4 changes: 2 additions & 2 deletions doc/source/gettingstarted/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ The **freud** CMake configuration also respects the following environment variab
Unit Tests
==========

The unit tests for **freud** are included in the repository and are configured to be run using the Python :mod:`unittest` library:
The unit tests for **freud** are included in the repository and are configured to be run using the Python :mod:`pytest` library:

.. code-block:: bash
# Run tests from the tests directory
cd tests
python -m unittest discover .
python -m pytest .
Note that because **freud** is designed to require installation to run (i.e. it cannot be run directly out of the build directory), importing **freud** from the root of the repository will fail because it will try and import the package folder.
As a result, unit tests must be run from outside the root directory if you wish to test the installed version of **freud**.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/reference/development/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ In order to achieve this goal, **freud** takes the following viewpoints:
standard for code, stressing explicitly written code which is easy
to read.
* To ensure correctness, **freud** employs unit testing using the
Python unittest framework. In addition, **freud** utilizes
Python :mod:`pytest` framework. In addition, **freud** utilizes
`CircleCI <https://circleci.com>`_ for continuous integration to
ensure that all of its code works correctly and that any changes or
new features do not break existing functionality.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/reference/development/howtoadd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ To keep modules well-organized, **freud** implements the following structure:
- The core Cython code for modules is contained in ``freud/MODULENAME.pyx`` (no underscore).
- Generated Cython C++ code (e.g. ``freud/MODULENAME.cxx``) should not be committed during development. These files are generated using Cython when building from source, and are unnecessary when installing compiled binaries.
- If a Cython module contains code that must be imported into other Cython modules (such as the :class:`freud.box.Box` class), the ``pyx`` file must be accompanied by a ``pxd`` file with the same name: ``freud/MODULENAME.pxd`` (distinguished from ``pxd`` files used to expose C++ code by the lack of a preceding underscore). For more information on how ``pxd`` files work, see the `Cython documentation <https://cython.readthedocs.io/en/latest/src/tutorial/pxd_files.html>`_.
- All tests in **freud** are based on the Python standard :mod:`unittest` library and are contained in the ``tests`` folder. Test files are named by the convention ``tests/test_MODULENAME_CLASSNAME.py``.
- All tests in **freud** are based on the Python :mod:`pytest` library and are contained in the ``tests`` folder. Test files are named by the convention ``tests/test_MODULENAME_CLASSNAME.py``.
- Benchmarks for **freud** are contained in the ``benchmarks`` directory and are named analogously to tests: ``benchmarks/benchmark_MODULENAME_CLASSNAME.py``.

Benchmarks
Expand Down
23 changes: 21 additions & 2 deletions freud/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,22 @@ if(${PYTHON_VERSION_MAJOR} EQUAL 3
add_compile_options("-Wno-deprecated-declarations")
endif()

# Detect when building against a conda environment set the _using_conda variable
# for use both in this file and in the parent
get_filename_component(_python_bin_dir ${PYTHON_EXECUTABLE} DIRECTORY)
if(EXISTS "${_python_bin_dir}/conda" OR DEFINED ENV{CONDA_EXE})
message("-- Detected conda python, setting INSTALL_RPATH_USE_LINK_PATH")
set(_using_conda On)
set(_using_conda
On
PARENT_SCOPE)
else()
set(_using_conda Off)
set(_using_conda
Off
PARENT_SCOPE)
endif()

set(cython_modules_with_cpp
box
cluster
Expand Down Expand Up @@ -86,8 +102,11 @@ foreach(cython_module ${cython_modules_with_cpp} ${cython_modules_without_cpp})
else()
set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH "\$ORIGIN")
endif()
set_target_properties(${cython_module} PROPERTIES INSTALL_RPATH_USE_LINK_PATH
True)

if(_using_conda)
set_target_properties(${cython_module}
PROPERTIES INSTALL_RPATH_USE_LINK_PATH True)
endif()
endforeach()

# The SolidLiquid class has an instance of cluster::Cluster as a member, so
Expand Down
2 changes: 1 addition & 1 deletion freud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# automatic selection runs, the user cannot change it.
set_num_threads(0)

__version__ = "2.4.1"
__version__ = "2.5.0"

__all__ = [
"__version__",
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.4.1
current_version = 2.5.0
commit = True
tag = True
message = Bump up to version {new_version}.
Expand All @@ -10,7 +10,7 @@ filename = *.py,*.pyx,*.pxi,*.pxd
exclude = .eggs,*.egg,build,extern,doc/source/gettingstarted/examples
select = E,F,W
ignore = E203,E225,E226,E227,E741,E999,W503,W504
per-file-ignores =
per-file-ignores =
freud/__init__.py: F401

[tool:pytest]
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from skbuild import setup as skbuild_setup

version = "2.4.1"
version = "2.5.0"

# Read README for PyPI, fallback to short description if it fails.
description = "Powerful, efficient trajectory analysis in scientific Python."
Expand Down Expand Up @@ -84,9 +84,9 @@ def setup(*args, **kwargs):
},
python_requires=">=3.6",
install_requires=[
"cython>=0.29",
"cython>=0.29.14",
"numpy>=1.14",
"rowan>=1.2",
"rowan>=1.2.1",
"scipy>=1.1",
],
tests_require=[
Expand Down

0 comments on commit 8151715

Please sign in to comment.