Skip to content

Commit

Permalink
Update pytest-split durations (#3211)
Browse files Browse the repository at this point in the history
* fix .gitattributes outdated test_files/**/* linguist-vendored causing wrong language detection

* test.yml fix --durations-path (test_files->tests/files)/.pytest-split-durations

* test_entry_tools.py del unused outdated test_dir

* update pytest-split durations with new jobs that weren't previously discovered since unittest to pytest transition due to XXTest class name ending, not starting with TestXX (oops!)

* re-add pymatgen-white.svg and fix link to logo in readme

set frameborder="0" on <iframe src="/assets/team-map.html">
  • Loading branch information
janosh authored Aug 3, 2023
1 parent e1c3b91 commit 86d85b7
Show file tree
Hide file tree
Showing 8 changed files with 2,558 additions and 2,516 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# declare HTML, rST and test files as vendored/docs to exclude them when calculating repo languages on GitHub
**/test_files/**/* linguist-vendored
**/test/files/**/* linguist-vendored
cmd_line/* linguist-vendored
docs/**/* linguist-generated
docs_rst/**/* linguist-documentation
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ jobs:
python -m pip install numpy cython packaging
python -m 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, do pip install pytest-split and run
# pytest --store-durations --durations-path tests/files/.pytest-split-durations
# and commit the results (requires pip install pytest-split)
run: |
pytest --cov=pymatgen --cov-report=xml --splits 10 --group ${{ matrix.split }} --durations-path test_files/.pytest-split-durations tests
pytest --cov=pymatgen --cov-report=xml --splits 10 --group ${{ matrix.split }} --durations-path tests/files/.pytest-split-durations tests
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/materialsproject/pymatgen/master/docs/assets/pymatgen-white.svg">
<img alt="Logo" src="https://raw.githubusercontent.com/materialsproject/pymatgen/master/docs/assets/pymatgen.svg"
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/materialsproject/pymatgen/raw/master/docs/assets/pymatgen-white.svg">
<img alt="Logo" src="https://github.com/materialsproject/pymatgen/raw/master/docs/assets/pymatgen.svg"
height="70">
</picture>
</h1>
Expand Down
1 change: 1 addition & 0 deletions docs/assets/pymatgen-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/team.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions tests/entries/test_entry_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import os
import unittest
from pathlib import Path

import pytest
from monty.serialization import dumpfn, loadfn
Expand All @@ -12,8 +11,6 @@
from pymatgen.entries.entry_tools import EntrySet, group_entries_by_composition, group_entries_by_structure
from pymatgen.util.testing import PymatgenTest

test_dir = Path(__file__).absolute().parent / ".." / ".." / ".." / "test_files"


class TestFunc(unittest.TestCase):
def test_group_entries_by_structure(self):
Expand Down
Loading

0 comments on commit 86d85b7

Please sign in to comment.