Skip to content

Commit

Permalink
Tests now run across whole of analysis.
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep committed Sep 15, 2019
1 parent c397607 commit 952ca7c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
echo "--- Done ---"
echo "flake8 checks..."
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics pymatgen
flake8 --count --show-source --statistics pymatgen/core pymatgen/electronic_structure pymatgen/ext pymatgen/io pymatgen/transformations
flake8 --count --show-source --statistics pymatgen/core pymatgen/electronic_structure pymatgen/ext pymatgen/io pymatgen/transformations pymatgen/analysis
# exit-zero treats all errors as warnings.
flake8 --count --exit-zero --max-complexity=10 --statistics pymatgen
echo "--- Done ---"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pmg-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ jobs:
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics pymatgen
flake8 --count --show-source --statistics pymatgen/core pymatgen/electronic_structure pymatgen/ext pymatgen/io pymatgen/transformations
flake8 --count --show-source --statistics pymatgen/core pymatgen/electronic_structure pymatgen/ext pymatgen/io pymatgen/transformations pymatgen/analysis
# exit-zero treats all errors as warnings.
flake8 --count --exit-zero --max-complexity=10 --statistics pymatgen
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ script:
- travis_wait 28800 pycodestyle pymatgen && mypy pymatgen && pytest $EXCLUDE_TESTS pymatgen
# Docstyle checks are enforced for files that have been modified since the v2019.9.12 tagged release.
- flake8 --count --select=E9,F63,F7,F82 --show-source --statistics pymatgen
- flake8 --count --show-source --statistics pymatgen/core pymatgen/electronic_structure pymatgen/ext pymatgen/io pymatgen/transformations
- flake8 --count --show-source --statistics pymatgen/core pymatgen/electronic_structure pymatgen/ext pymatgen/io pymatgen/transformations pymatgen/analysis
- flake8 --count --exit-zero --max-complexity=10 --statistics pymatgen
- export MODIFIED_FILES=`git diff --diff-filter=ACMRTUXB --name-only HEAD v2019.9.12 | grep -E 'pymatgen.*\.(py)$' | sed '/test_/d' | sed 'post_processors_abc/d' | tr '\n' ' '`
- pydocstyle --count pymatgen/core $MODIFIED_FILES
Expand Down
10 changes: 7 additions & 3 deletions pymatgen/analysis/graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.

"""
Module for graph representations of crystals.
"""

import warnings
import subprocess
Expand Down Expand Up @@ -76,7 +79,6 @@ def _isomorphic(frag1, frag2):
f2_nodes = frag2.nodes(data=True)
if len(f1_nodes) != len(f2_nodes):
return False
f1_edges = frag1.edges()
f2_edges = frag2.edges()
if len(f2_edges) != len(f2_edges):
return False
Expand Down Expand Up @@ -1512,8 +1514,10 @@ def edge_match(e1, e2):


class MolGraphSplitError(Exception):
# Raised when a molecule graph is failed to split into two disconnected
# subgraphs
"""
Raised when a molecule graph is failed to split into two disconnected
subgraphs
"""
pass


Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ statistics = True
exclude=test_*,pymatgen/__init__.py,docs_rst/*.py

[flake8]
exclude = .git,__pycache__,docs_rst/conf.py,tests,pymatgen/io/abinit,__init__.py,pymatgen/analysis/chemenv,pymatgen/analysis/defects
exclude = .git,__pycache__,docs_rst/conf.py,tests,pymatgen/io/abinit,__init__.py,pymatgen/analysis/chemenv,pymatgen/analysis/defects,pymatgen/analysis/magnetism
# max-complexity = 10
extend-ignore = E741
max-line-length = 120
Expand Down

0 comments on commit 952ca7c

Please sign in to comment.