Skip to content

Commit

Permalink
fixing GDAL import on test
Browse files Browse the repository at this point in the history
  • Loading branch information
betolink committed May 5, 2023
1 parent fa83f08 commit 9d51bfc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/scan_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def ensure_environment(notebook, libraries):

def scan_notebook(notebook_path):
notebook_path = notebook_path.replace(" ", "\\ ")
command = f"pipreqsnb {notebook_path} --print"
command = f"pipreqsnb {notebook_path} --print --debug"

libraries = []
libraries = set()
p = subprocess.Popen(
command,
shell=True,
Expand All @@ -42,8 +42,10 @@ def scan_notebook(notebook_path):
parsed_out = inline.decode("UTF-8").lower()
if "==" in parsed_out:
library = parsed_out.split("==")[0]
libraries.append(library)
print(libraries)
if library.lower() == "gdal":
library = "osgeo"
libraries.add(library)
print(list(libraries))

ensure_environment(notebook_path, libraries)

Expand Down

0 comments on commit 9d51bfc

Please sign in to comment.