Skip to content

Commit a2bb9ab

Browse files
committed
Merge branch 'move_to_src_layout' into 'main'
refactor: move to src layout See merge request cschmidt/4c-webviewer!2
2 parents 0ab7569 + 02b6bbf commit a2bb9ab

File tree

14 files changed

+14
-15
lines changed

14 files changed

+14
-15
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ fourc_webviewer = "fourc_webviewer.cli_utils:main"
1616
[tool.setuptools.dynamic]
1717
dependencies = { file = ["requirements.txt"] }
1818

19-
[tool.setuptools.packages.find]
20-
include = ["*"]
19+
[tool.setuptools]
20+
package-dir = { "" = "src" }
File renamed without changes.

fourc_webviewer/input_file_utils/dat_file_visualization.py renamed to src/fourc_webviewer/input_file_utils/dat_file_visualization.py

File renamed without changes.

fourc_webviewer/input_file_utils/read_dat_file.py renamed to src/fourc_webviewer/input_file_utils/read_dat_file.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import re
66

77
from fourc_webviewer.python_utils import list_is_iterable
8+
from pathlib import Path
89

910

1011
def add_dat_file_data_to_dis(dis):
@@ -564,13 +565,9 @@ def sort_conditions(src_cond_entity_list, src_cond_type_list, src_cond_context_l
564565

565566
def validate_dat_file_path(dat_file_path):
566567
# Validate the file path: file has to exist and end with ".dat"
567-
if not dat_file_path.endswith(".dat"):
568-
raise Exception("Provided file does not end with .dat!")
568+
dat_file_path = Path(dat_file_path)
569+
if dat_file_path.suffix != ".dat":
570+
raise Exception(f"Provided file {dat_file_path} does not end with .dat!")
569571

570-
if not os.path.exists(dat_file_path):
572+
if not dat_file_path.is_file():
571573
raise Exception("Provided file does not exist!")
572-
573-
574-
if __name__ == "__main__":
575-
...
576-
# no need to implement anything here, as the method can only be called from within the main.py
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)