Skip to content

Commit 59455e5

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ba48dda commit 59455e5

25 files changed

+37
-21
lines changed

.bumpversion.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ current_version = 0.0.10-dev
33
commit = True
44
tag = False
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?:-(?P<release>[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+(?P<build>[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?
6-
serialize =
6+
serialize =
77
{major}.{minor}.{patch}-{release}+{build}
88
{major}.{minor}.{patch}+{build}
99
{major}.{minor}.{patch}-{release}
@@ -12,7 +12,7 @@ serialize =
1212
[bumpversion:part:release]
1313
optional_value = production
1414
first_value = dev
15-
values =
15+
values =
1616
dev
1717
production
1818

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,4 +389,4 @@ $RECYCLE.BIN/
389389

390390
# End of https://www.toptal.com/developers/gitignore/api/linux,macos,python,pycharm,windows,vim,visualstudiocode,jupyternotebooks
391391
scratch/
392-
dev/
392+
dev/

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<img alt="Tests" src="https://github.com/kjappelbaum/structuregraph-helpers/workflows/Tests/badge.svg" />
1414
</a>
1515
<a href="https://github.com/cthoyt/cookiecutter-python-package">
16-
<img alt="Cookiecutter template from @cthoyt" src="https://img.shields.io/badge/Cookiecutter-python--package-yellow" />
16+
<img alt="Cookiecutter template from @cthoyt" src="https://img.shields.io/badge/Cookiecutter-python--package-yellow" />
1717
</a>
1818
<a href="https://pypi.org/project/structuregraph_helpers">
1919
<img alt="PyPI" src="https://img.shields.io/pypi/v/structuregraph_helpers" />
@@ -116,7 +116,7 @@ This package was created with [@audreyfeldroy](https://github.com/audreyfeldroy)
116116
<details>
117117
<summary>See developer instrutions</summary>
118118

119-
119+
120120
The final section of the README is for if you want to get involved by making a code contribution.
121121

122122
### ❓ Testing

binder/postBuild

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python -m pip install --upgrade .
1+
python -m pip install --upgrade .

binder/runtime.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python-3.8
1+
python-3.8

docs/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ help:
1616
# Catch-all target: route all unknown targets to Sphinx using the new
1717
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1818
%: Makefile
19-
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
19+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/source/api.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ Hash
3333

3434

3535

36-
Logging
36+
Logging
3737
---------
3838

39-
structuregraph_helpers uses the `loguru <https://loguru.readthedocs.io/en/stable/index.html>`_ for logging.
39+
structuregraph_helpers uses the `loguru <https://loguru.readthedocs.io/en/stable/index.html>`_ for logging.
4040
By default, logging from structuregraph_helpers is disabled to not interfere with your logs.
4141

4242
However, you can easily customize the logging:
@@ -46,17 +46,17 @@ However, you can easily customize the logging:
4646
import sys
4747
from loguru import logger
4848
49-
# enable structuregraph_helpers logging
49+
# enable structuregraph_helpers logging
5050
logger.enable("structuregraph_helpers")
51-
51+
5252
# define the logging level
5353
LEVEL = "INFO || DEBUG || WARNING || etc."
5454
5555
# set the handler
5656
# for logging to stdout
57-
logger.add(sys.stdout, level=LEVEL)
57+
logger.add(sys.stdout, level=LEVEL)
5858
# or for logging to a file
59-
logger.add("my_log_file.log", level=LEVEL, enqueue=True)
59+
logger.add("my_log_file.log", level=LEVEL, enqueue=True)
6060
6161
6262
In many cases, however, you might find it convenient to simply call :py:meth:`~structuregraph_helpers.utils.enable_logging`
@@ -67,4 +67,4 @@ In many cases, however, you might find it convenient to simply call :py:meth:`~s
6767
6868
enable_logging()
6969
70-
which will enable logging with sane defaults (i.e. logging to ``stderr`` for ``INFO`` and ``WARNING`` levels).
70+
which will enable logging with sane defaults (i.e. logging to ``stderr`` for ``INFO`` and ``WARNING`` levels).

docs/source/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ structuregraph_helpers |release| Documentation
22
==============================================
33

44
:code:`structuregraph_helpers` is a collection of helper functions
5-
that can be useful when working with :code:`pymatgen`'s :code:`StructureGraph`.
5+
that can be useful when working with :code:`pymatgen`'s :code:`StructureGraph`.
66

77
.. toctree::
88
:maxdepth: 2

setup.cfg

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ package_dir =
7070
where = src
7171

7272
[options.extras_require]
73-
plotting =
73+
plotting =
7474
plotly
75-
lint =
75+
lint =
7676
isort
7777
black
7878
flake8
@@ -168,4 +168,4 @@ application-import-names =
168168
structuregraph_helpers
169169
tests
170170
per-file-ignores =
171-
tests/*.py:DAR101, D205, D100, DAR101, DAR201, D209, D103
171+
tests/*.py:DAR101, D205, D100, DAR101, DAR201, D209, D103

src/structuregraph_helpers/_hasher.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# -*- coding: utf-8 -*-
12
"""
2-
Code below is taken from networkx.
3+
Code below is taken from networkx.
34
4-
License:
5+
License:
56
67
NetworkX is distributed with the 3-clause BSD license.
78

src/structuregraph_helpers/analysis.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
"""Helpers for analysing structure graphs."""
23
from typing import List
34

src/structuregraph_helpers/cli.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
"""Command-line interface for StructureGraphHelpers."""
23
import concurrent.futures
34
import os

src/structuregraph_helpers/create.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
"""Helpers for creating graphs."""
23
import os
34
from typing import Iterable, Tuple

src/structuregraph_helpers/delete.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
"""Helpers for deleting parts of graphs."""
23
from collections import defaultdict
34
from copy import deepcopy

src/structuregraph_helpers/hash.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
"""Create hash strings for structure graphs.
23
34
Note that two LQGs of the same net (crystallographic net)

src/structuregraph_helpers/plotting.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
"""Plotting helpers."""
23
import plotly.graph_objs as go
34

src/structuregraph_helpers/subgraph.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
"""Extract subgraphs from structure graphs."""
23
import warnings
34
from collections import defaultdict

src/structuregraph_helpers/utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
import json
23
import sys
34
from typing import List

tests/conftest.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
import os
23

34
import pytest

tests/test_analysis.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from pymatgen.analysis.graphs import StructureGraph
23

34
from structuregraph_helpers.analysis import get_cn, get_dimensionality_larsen, get_leaf_nodes

tests/test_cli.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
import os
23

34
from click.testing import CliRunner

tests/test_create.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
import networkx as nx
23
from pymatgen.analysis.graphs import StructureGraph
34

tests/test_delete.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
import networkx as nx
23
from pymatgen.analysis.graphs import StructureGraph
34

tests/test_hash.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from pymatgen.analysis.graphs import StructureGraph
23
from pymatgen.transformations.standard_transformations import RotationTransformation
34

tests/test_subgraph.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
import numpy as np
23
from pymatgen.analysis.graphs import MoleculeGraph
34
from pymatgen.core import Molecule

0 commit comments

Comments
 (0)