Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make codebase black #507

Merged
merged 4 commits into from
Jan 20, 2022
Merged

Make codebase black #507

merged 4 commits into from
Jan 20, 2022

Conversation

niklassiemer
Copy link
Member

Replaces #499 and adds workflows right away

@niklassiemer niklassiemer added the format_black reformat the code using the black standard label Jan 20, 2022
@niklassiemer niklassiemer added format_black reformat the code using the black standard and removed format_black reformat the code using the black standard labels Jan 20, 2022
@niklassiemer
Copy link
Member Author

That was something I did not expect... The result of black codebase was after all not accepted by black?!?

--- pyiron_atomistics/thermodynamics/hessian.py	2022-01-20 10:20:22.931989 +0000
+++ pyiron_atomistics/thermodynamics/hessian.py	2022-01-20 10:20:33.322222 +0000
@@ -124,15 +124,18 @@
     def interactive_pressures_getter(self):
         return self._pressure
 
     def interactive_cells_setter(self, cell):
         if np.sum(self._stiffness_tensor) != 0:
-            epsilon = np.einsum(
-                "ij,jk->ik",
-                self.structure.cell,
-                np.linalg.inv(self._reference_structure.cell),
-            ) - np.eye(3)
+            epsilon = (
+                np.einsum(
+                    "ij,jk->ik",
+                    self.structure.cell,
+                    np.linalg.inv(self._reference_structure.cell),
+                )
+                - np.eye(3)
+            )
             epsilon = (epsilon + epsilon.T) * 0.5
             epsilon = np.append(
                 epsilon.diagonal(), np.roll(epsilon, -1, axis=0).diagonal()
             )
             pressure = -np.einsum("ij,j->i", self._stiffness_tensor, epsilon)
would reformat pyiron_atomistics/thermodynamics/hessian.py
Oh no! 💥 💔 💥
1 file would be reformatted, 108 files would be left unchanged.

Let's see if a second run also captures this change :)

@coveralls
Copy link

coveralls commented Jan 20, 2022

Pull Request Test Coverage Report for Build 1722855370

  • 903 of 1280 (70.55%) changed or added relevant lines in 68 files are covered.
  • 51 unchanged lines in 23 files lost coverage.
  • Overall coverage decreased (-0.007%) to 70.154%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pyiron_atomistics/atomistics/master/serial.py 0 1 0.0%
pyiron_atomistics/atomistics/structure/factory.py 19 20 95.0%
pyiron_atomistics/lammps/units.py 7 8 87.5%
pyiron_atomistics/vasp/interactive.py 1 2 50.0%
pyiron_atomistics/vasp/procar.py 0 1 0.0%
pyiron_atomistics/vasp/vasprun.py 11 12 91.67%
pyiron_atomistics/vasp/vaspsol.py 1 2 50.0%
pyiron_atomistics/atomistics/job/potentials.py 2 4 50.0%
pyiron_atomistics/atomistics/job/structurecontainer.py 4 6 66.67%
pyiron_atomistics/atomistics/master/parallel.py 0 2 0.0%
Files with Coverage Reduction New Missed Lines %
pyiron_atomistics/atomistics/master/murnaghan.py 1 72.15%
pyiron_atomistics/atomistics/master/phonopy.py 1 47.66%
pyiron_atomistics/atomistics/structure/atoms.py 1 74.86%
pyiron_atomistics/atomistics/structure/neighbors.py 1 95.63%
pyiron_atomistics/interactive/sxextoptint.py 1 32.52%
pyiron_atomistics/lammps/units.py 1 97.14%
pyiron_atomistics/sphinx/interactive.py 1 50.87%
pyiron_atomistics/sphinx/volumetric_data.py 1 72.97%
pyiron_atomistics/table/funct.py 1 59.74%
pyiron_atomistics/vasp/procar.py 1 30.86%
Totals Coverage Status
Change from base Build 1715012218: -0.007%
Covered Lines: 11614
Relevant Lines: 16555

💛 - Coveralls

@niklassiemer niklassiemer merged commit 8d55c6f into master Jan 20, 2022
@delete-merged-branch delete-merged-branch bot deleted the make_black branch January 20, 2022 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format_black reformat the code using the black standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants