-
Notifications
You must be signed in to change notification settings - Fork 875
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicit UTF-8 encoding for VASP input files with
zopen
, and open
…
… for other text files (#4218) * explicit utf-8 encoding for kpoints from file * explicit utf-8 elsewhere * fix root level and dev_scripts * simplify PMG PKG path * fix analysis, cli, command_line * fix electronic_structure, entries and ext * fix io, phonon and symmetry * fix alchemy and anlysis tests * fix apps, command_line, core, elec_struct, entries, ext and vis tests * finish io and phonon tests * remove unnecessary seek * revert encoding for json dump * type custom paths * revert another json dump * ignore userwarning by default * relocate test-only env var * remove unneeded default tag for non-userwarning * also explicit utf-8 for json dump though forced ASCII * utf8 is alias to utf-8 in codecs, but maybe prefer the standard name * fix missing encoding in comment * add test for Γ decoding * better error message --------- Signed-off-by: Matthew Horton <[email protected]> Co-authored-by: Shyue Ping Ong <[email protected]> Co-authored-by: Matthew Horton <[email protected]>
- Loading branch information
1 parent
361106f
commit 777a6b2
Showing
109 changed files
with
319 additions
and
304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
from __future__ import annotations | ||
|
||
import json | ||
import os | ||
import warnings | ||
from typing import TYPE_CHECKING | ||
|
||
|
@@ -18,6 +17,7 @@ | |
|
||
from pymatgen.analysis.phase_diagram import GrandPotentialPhaseDiagram, PhaseDiagram | ||
from pymatgen.analysis.reaction_calculator import Reaction | ||
from pymatgen.core import PKG_DIR | ||
from pymatgen.core.composition import Composition | ||
from pymatgen.util.due import Doi, due | ||
from pymatgen.util.plotting import pretty_plot | ||
|
@@ -31,7 +31,7 @@ | |
__email__ = "[email protected]" | ||
__date__ = "Sep 1, 2021" | ||
|
||
with open(os.path.join(os.path.dirname(__file__), "..", "util", "plotly_interface_rxn_layouts.json")) as file: | ||
with open(f"{PKG_DIR}/util/plotly_interface_rxn_layouts.json", encoding="utf-8") as file: | ||
plotly_layouts = json.load(file) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.