Skip to content

Commit

Permalink
fix black
Browse files Browse the repository at this point in the history
  • Loading branch information
jessica-mitchell committed Aug 21, 2023
1 parent 0a42876 commit 97527d1
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions doc/htmldoc/_ext/extract_api_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def process_directory(directory):
for root, _, files in os.walk(directory):
for file in files:
if file.endswith(".py"):
file_path = os.path.join(root,file)
file_path = os.path.join(root, file)
if "helper" not in file:
if "pynest/nest/__init__" in file_path:
api_name = "nest.NestModule"
Expand All @@ -80,23 +80,24 @@ def process_directory(directory):
if "hl_" in file:
parts = file_path.split(os.path.sep)
nest_index = parts.index("nest")
module_path = ".".join(parts[nest_index + 1:-1])
module_path = ".".join(parts[nest_index + 1 : -1])
module_name = os.path.splitext(parts[-1])[0]
api_name = f"nest.{module_path}.{module_name}"
all_variables = find_all_variables(file_path)
if all_variables:
api_dict[api_name] = all_variables
if "raster_plot" in file or "visualization" in file or "voltage_trace" in file:
parts = file_path.split(os.path.sep)
nest_index = parts.index("nest")
module_name = os.path.splitext(parts[-1])[0]
api_name = f"nest.{module_name}"
all_variables = find_all_variables(file_path)
if all_variables:
api_dict[api_name] = all_variables
parts = file_path.split(os.path.sep)
nest_index = parts.index("nest")
module_name = os.path.splitext(parts[-1])[0]
api_name = f"nest.{module_name}"
all_variables = find_all_variables(file_path)
if all_variables:
api_dict[api_name] = all_variables

return api_dict


def ExtractPyNESTAPIS():
directory = "../../pynest/nest/"
all_variables_dict = process_directory(directory)
Expand Down

0 comments on commit 97527d1

Please sign in to comment.