Merge pull request #926 from PyPSA/efficient-helper-source-path

remove inefficient _helper.py file search
This commit is contained in:
Fabian Neumann 2024-02-13 07:38:39 +01:00 committed by GitHub
commit a13da7bab7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,11 +4,8 @@
import os, sys, glob import os, sys, glob
helper_source_path = [match for match in glob.glob("**/_helpers.py", recursive=True)] path = workflow.source_path("../scripts/_helpers.py")
sys.path.insert(0, os.path.dirname(path))
for path in helper_source_path:
path = os.path.dirname(os.path.abspath(path))
sys.path.insert(0, os.path.abspath(path))
from _helpers import validate_checksum from _helpers import validate_checksum