nwb_project_analytics.create_codestat_pages module

Script for creating rst pages and figures with NWB code statistics

nwb_project_analytics.create_codestat_pages.create_codestat_pages(out_dir: str, data_dir: str, cloc_path: str = 'cloc', load_cached_results: bool = True, cache_results: bool = True, cache_contributor_emails: bool = False, start_date: datetime | None = None, end_date: datetime | None = None, print_status: bool = True)

Main function used to render all pages and figures related to the tool statistics

Parameters:
  • out_dir – Directory where the RST and image files should be saved to

  • data_dir – Directory where the data for the code statistics should be cached

  • cloc_path – Path to the cloc tool if not callable directly via “cloc”

  • load_cached_results – Load code statists from data_dir if available

  • cache_results – Save code statistic results to data_dir

  • cache_contributor_emails – Save the emails of contributors in the cached TSV file

  • start_date – Datetime object with the star tdate for plots. If None then NWBGitInfo.NWB2_START_DATE will be used as default.

  • end_date – Datetime object with the end date for plots. If None then datetime.today() will be used as default.

  • print_status – Print status of creation (Default=True)

nwb_project_analytics.create_codestat_pages.create_toolstat_page(out_dir: str, repo_name: str, repo: GitRepo, figures: OrderedDict, print_status: bool = True)

Create a page with the statistics for a particular tool

Parameters:
  • out_dir – Directory where the RST file should be saved to

  • repo_name – Name of the code repository

  • figures – OrderedDict of RSTFigure object to render on the page

  • print_status – Print status of creation (Default=True)

Returns:

nwb_project_analytics.create_codestat_pages.init_codestat_pages_dir(out_dir)

Delete out_dir and all its contents and create a new clean out_dir :param out_dir: Directory to be removed :return: