Skip to content

Commit

Permalink
exclude helper include visual api
Browse files Browse the repository at this point in the history
  • Loading branch information
jessica-mitchell committed Aug 21, 2023
1 parent f4c01dd commit 0a42876
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
24 changes: 16 additions & 8 deletions doc/htmldoc/_ext/extract_api_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ def process_directory(directory):
for file in files:
if file.endswith(".py"):
file_path = os.path.join(root,file)
if "pynest/nest/__init__" in file_path:
api_name = "nest.NestModule"
all_variables = find_all_variables(file_path)
if all_variables:
api_dict[api_name] = all_variables
else:
if "hl_" in file and "connection_helpers" not in file:
if "helper" not in file:
if "pynest/nest/__init__" in file_path:
api_name = "nest.NestModule"
all_variables = find_all_variables(file_path)
if all_variables:
api_dict[api_name] = all_variables
if "hl_" in file:
parts = file_path.split(os.path.sep)
nest_index = parts.index("nest")
module_path = ".".join(parts[nest_index + 1:-1])
Expand All @@ -86,8 +86,16 @@ def process_directory(directory):
all_variables = find_all_variables(file_path)
if all_variables:
api_dict[api_name] = all_variables
return api_dict
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

return api_dict

def ExtractPyNESTAPIS():
directory = "../../pynest/nest/"
Expand Down
5 changes: 5 additions & 0 deletions pynest/nest/lib/hl_api_sonata.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
# You should have received a copy of the GNU General Public License
# along with NEST. If not, see <http://www.gnu.org/licenses/>.

"""
Functions to build and simulate networks with the SONATA format
"""


import itertools
import json
import os
Expand Down

0 comments on commit 0a42876

Please sign in to comment.