Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,16 @@ permissions:
contents: read

jobs:
build:
lint:
# prevent this action from running on forks
if: github.repository == 'materialsproject/pymatgen'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: '3.8'
cache: pip
cache-dependency-path: setup.py
- name: Install dependencies
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/test-mac.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/test-win.yml

This file was deleted.

27 changes: 17 additions & 10 deletions .github/workflows/test-linux.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow runs only on Ubuntu and aims to be more complete than the Mac and Windows workflows.
# In particular, Openbabel and many of the external command line dependencies are included for testing.defaults:
# The ext package is also only tested in this workflow. Coverage is computed based on this workflow.
name: Testing Linux
name: Tests

on:
push:
Expand All @@ -13,20 +13,22 @@ permissions:
contents: read

jobs:
test:
pytest:
# prevent this action from running on forks
if: github.repository == 'materialsproject/pymatgen'
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.8']
# pytest-split automatically distributes work load so parallel jobs finish in similar time
split: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
continue-on-error: true

env:
PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }}
MPLBACKEND: "Agg"
MPLBACKEND: Agg
PMG_TEST_FILES_DIR: ${{ github.workspace }}/test_files
GULP_LIB: ${{ github.workspace }}/cmd_line/gulp/Libraries

Expand All @@ -38,28 +40,33 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: setup.py
- name: Add CLIs to GITHUB_PATH
if: runner.os != 'Windows'
# This is the way to update env variables in a way that persist for the entire job.
run: |
for pkg in cmd_line/*;
do echo "$(pwd)/cmd_line/$pkg/Linux_64bit" >> "$GITHUB_PATH";
done
- name: Install dependencies
run: |
# Note that this is the way to update env variables in a way that persist for the entire job.
for pkg in `ls cmd_line`; do echo "`pwd`/cmd_line/$pkg/Linux_64bit" >> $GITHUB_PATH; done
pip install --upgrade pip wheel
pip install m3gnet
pip install -e '.[dev,optional]'
- name: pytest split ${{ matrix.split }}
# to update the test durations, run pytest --store-durations --durations-path test_files/.pytest-split-durations
# to update the test durations, run
# pytest --store-durations --durations-path test_files/.pytest-split-durations
# and commit the results
continue-on-error: true
run: |
pytest --cov=pymatgen --splits 10 --group ${{ matrix.split }} \
--durations-path test_files/.pytest-split-durations
pytest --cov=pymatgen --splits 10 --group ${{ matrix.split }} --durations-path test_files/.pytest-split-durations
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: coverage-${{ matrix.split }}
path: .coverage

coverage:
needs: test
needs: pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,14 @@
# "hiphive>=0.6",
# "m3gnet>=0.0.8",
"ase>=3.22.1",
"BoltzTraP2>=22.3.2",
# https://peps.python.org/pep-0508/#environment-markers
"BoltzTraP2>=22.3.2; platform_system!='Windows'",
"chemview>=0.6",
"f90nml>=1.1.2",
"fdint>=2.0.2",
"galore>=0.6.1",
"h5py>=3.6.0",
"h5py==3.6.0", # pinned due to 3.7 crashing on windows
# https://github.com/h5py/h5py/issues/2110
"jarvis-tools>=2020.7.14",
"netCDF4>=1.5.8",
"phonopy>=2.4.2",
Expand Down