Skip to content

Commit

Permalink
use pathlib
Browse files Browse the repository at this point in the history
  • Loading branch information
superstar54 committed Sep 21, 2023
1 parent 3ea9dce commit b3b2521
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/aiidalab_qe/app/structure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Authors: AiiDAlab team
"""
import os
import pathlib
import warnings

Expand All @@ -29,14 +28,14 @@

# The Examples list of (name, file) tuple curretly passed to
# StructureExamplesWidget.
file_path = pathlib.Path(__file__).parent.resolve()
file_path = pathlib.Path(__file__).parent
Examples = [
("Silicon (diamond)", os.path.join(file_path, "examples/Si.xyz")),
("Silicon oxide", os.path.join(file_path, "examples/SiO2.xyz")),
("Diamond", os.path.join(file_path, "examples/diamond.cif")),
("Gallium arsenide", os.path.join(file_path, "examples/GaAs.xyz")),
("Gold (fcc)", os.path.join(file_path, "examples/Au.cif")),
("Cobalt (hcp)", os.path.join(file_path, "examples/Co.cif")),
("Silicon (diamond)", file_path / "examples" / "Si.xyz"),
("Silicon oxide", file_path / "examples" / "SiO2.xyz"),
("Diamond", file_path / "examples" / "diamond.cif"),
("Gallium arsenide", file_path / "examples" / "GaAs.xyz"),
("Gold (fcc)", file_path / "examples" / "Au.cif"),
("Cobalt (hcp)", file_path / "examples" / "Co.cif"),
]


Expand Down

0 comments on commit b3b2521

Please sign in to comment.