From c9cc02f65ed2eba1bc0957350ed233079911dea6 Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Thu, 29 Jul 2021 16:05:08 -0700 Subject: [PATCH 1/2] expanded tests - test all supported Python (3.7-3.9) on Linux/macOS/windows - streamlined ci.yaml (and add wheel package to tests) --- .github/workflows/ci.yaml | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b553974a..d80f06dd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,19 +11,18 @@ on: branches: - "master" +concurrency: + group: "${{ github.ref }}-${{ github.head_ref }}" + cancel-in-progress: true + jobs: test: runs-on: ${{ matrix.os }} strategy: - fail-fast: false + fail-fast: true matrix: - os: - - ubuntu-latest - #- macOS-latest - python-version: - - 3.7 - - 3.8 - - 3.9 + os: ["ubuntu-latest", "macOS-latest", "windows-latest"] + python-version: ["3.7", "3.8", "3.9"] steps: - uses: actions/checkout@v2 @@ -32,36 +31,36 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - architecture: x64 - - name: Environment Information - shell: bash -l {0} + - name: Display Python version + run: python -c "import sys; print(sys.version)" + + - name: Install some dependencies (binary only, no version restrictions) run: | - python --version + python -m pip install wheel + python -m pip install --only-binary=numpy numpy + python -m pip install --only-binary=scipy scipy + python -m pip install --only-binary=matplotlib matplotlib - name: Install pytest, pytest plugins - shell: bash -l {0} run: | python -m pip install pytest pytest-cov pytest-pep8 - name: Install alchemtest - shell: bash -l {0} run: | - python -m pip install --only-binary=numpy numpy # Otherwise this would take ages python -m pip install https://github.com/alchemistry/alchemtest/archive/master.zip - - name: Install package - shell: bash -l {0} + - name: Install package (with remaining dependencis) run: | python -m pip install . - name: Run tests - shell: bash -l {0} run: | - pytest -v --cov alchemlyb --cov-report=xml src/alchemlyb/tests + pytest -v --cov alchemlyb --cov-report=xml --color=yes src/alchemlyb/tests - name: Codecov uses: codecov/codecov-action@v1.5.2 with: + name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} file: ./coverage.xml fail_ci_if_error: true From ff7ed5d7d5ac5a03e6ff67db14f45d27f886c447 Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Thu, 29 Jul 2021 16:05:44 -0700 Subject: [PATCH 2/2] update CHANGES for 0.5.0 - state explicitly supported Python on OS - move Changes to top position and reordered changes by importance - added explicit item for unit-awareness (#125) - add date --- CHANGES | 44 ++++++++++++++++++++++++-------------------- setup.py | 3 ++- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/CHANGES b/CHANGES index 2ada18e1..c1500c05 100644 --- a/CHANGES +++ b/CHANGES @@ -13,36 +13,40 @@ The rules for this file: * release numbers follow "Semantic Versioning" http://semver.org ------------------------------------------------------------------------------ -??/??/2021 xiki-tempula, orbeckst +08/01/2021 xiki-tempula, orbeckst * 0.5.0 +Changes + - alchemlyb adopts NEP29 + https://numpy.org/neps/nep-0029-deprecation_policy.html + to effectively only support the last 2-3 minor Python versions + - Removed support for Python 2.7 and 3.6 (issue #130, #140): + supported/tested Python versions are 3.7, 3.8, 3.9 on + Linux, macOS, and Windows + - The scipy constant for gas constant is used for parsers instead of the + constants used by the corresponding MD engine (issue #125, PR #129). + This leads to small changes in results from GROMACS simulations in kT + compared to the previous releases, with a relative difference on the order + of 1e-7. + - Added unit-awareness: the base unit remains kT but dataframes need to + carry the unit and temperature in a DataFrame.attrs so that dataframes + can be easily converted to different energy units (issue #125) + - The parser outputs dataframe with metadata (issue #125, PR #129). + - Visualisation module will change the data according to input unit + (issue #125, PR #129). + - Bump the minimum pandas version to 1.2 (issue #130, #140). + Enhancements - postprocessors.units module for unit conversion (issue #125, PR #129). - pass_attrs decorator for safely passing variable (issue #125, PR #129). - alchemlyb.concat added to replace pd.concat (issue #125, PR #129). -Deprecations - Fixes - - `alchemlyb.concat()` should raise ValueError when given empty list, to be compatible with - pandas.concat() (issue #150, PR #152). - - Fix the support for pandas >= 1.3 (issue #147, PR #148). + - `alchemlyb.concat()` should raise ValueError when given empty list, to be + compatible with pandas.concat() (issue #150, PR #152). + - Fix the support for pandas >= 1.3 by skipping 1.3.0 (issue #147, PR #148). - Fix separate_dhdl not work for multiple columns (issue #149, PR #151). - -Changes - - The scipy constant for gas constant is used for parsers instead of the - constants used by the corresponding MD engine (issue #125, PR #129). - This leads to small changes in results from GROMACS simulations compared to the - previous releases. - - Visualisation module will change the data according to input unit (issue - #125,PR #129). - - The parser output dataframe with metadata (issue #125, PR #129). - - alchemlyb adopts NEP29 - https://numpy.org/neps/nep-0029-deprecation_policy.html - to effectively only support the last 2-3 minor Python versions - - Removed support for Python 2.7 and 3.6 (issue #130, #140). - - Bump the minimum pandas version to 1.2 (issue #130, #140). 06/08/2021 orbeckst diff --git a/setup.py b/setup.py index 91021899..804b21dd 100755 --- a/setup.py +++ b/setup.py @@ -43,5 +43,6 @@ long_description=open('README.rst').read(), long_description_content_type='text/x-rst', tests_require = ['pytest', 'alchemtest'], - install_requires=['numpy', 'pandas>=1.2,!=1.3.0', 'pymbar>=3.0.5,<4', 'scipy', 'scikit-learn', 'matplotlib'] + install_requires=['numpy', 'pandas>=1.2,!=1.3.0', 'pymbar>=3.0.5,<4', + 'scipy', 'scikit-learn', 'matplotlib'] )