{"id":23085791,"url":"https://github.com/neurodatawithoutborders/nwb-project-analytics","last_synced_at":"2025-08-16T04:31:43.510Z","repository":{"id":184688533,"uuid":"309769306","full_name":"NeurodataWithoutBorders/nwb-project-analytics","owner":"NeurodataWithoutBorders","description":"Repository for collecting analytics and scripts related to the NWB project. ","archived":false,"fork":false,"pushed_at":"2024-10-30T05:48:25.000Z","size":124833,"stargazers_count":1,"open_issues_count":10,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-10-30T08:39:20.590Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NeurodataWithoutBorders.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-03T18:08:54.000Z","updated_at":"2024-10-30T05:48:29.000Z","dependencies_parsed_at":"2023-12-21T08:14:59.716Z","dependency_job_id":"db807b43-e429-4511-b0c5-c72468bb21ed","html_url":"https://github.com/NeurodataWithoutBorders/nwb-project-analytics","commit_stats":null,"previous_names":["neurodatawithoutborders/nwb-project-analytics"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeurodataWithoutBorders%2Fnwb-project-analytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeurodataWithoutBorders%2Fnwb-project-analytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeurodataWithoutBorders%2Fnwb-project-analytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeurodataWithoutBorders%2Fnwb-project-analytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NeurodataWithoutBorders","download_url":"https://codeload.github.com/NeurodataWithoutBorders/nwb-project-analytics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230005219,"owners_count":18158367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-16T18:10:56.688Z","updated_at":"2025-08-16T04:31:43.493Z","avatar_url":"https://github.com/NeurodataWithoutBorders.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"=====================\nnwb-project-analytics\n=====================\n\nRepository for collecting analytics and scripts related to the NWB project.\n\nThe NWB project maintains and contributes to a large number of codes\nrelated to NWB. The goal of this effort is to help  developers to get a\nquick overview of the state of NWB code repositories. See, e.g., the `code health page \u003chttps://github.com/NeurodataWithoutBorders/nwb-project-analytics/blob/main/docs/source/code_health.rst\u003e`_\n\n**Status:** This project is under active development. The code is in the alpha development phase.\n\nHow to use nwb-project-analytics (the docs)\n===========================================\n\nAll main NWB analytics are compiled automatically when building the ``docs``\n\n1. Create a virtual environment (option)\n\n.. code-block:: bash:\n\n    conda create --name nwb_analytics_env python=3.13\n    conda activate nwb_analytics_env\n\n2. Install ``cloc`` (see `here \u003chttps://github.com/AlDanial/cloc#install-via-package-manager\u003e`_)\n   (only needed when you want to update the cloc code statistics in ``data/``)\n\n3. Install the tools via\n\n.. code-block:: bash\n\n    git clone https://github.com/NeurodataWithoutBorders/nwb-project-analytics.git\n    cd nwb-project-analytics\n    pip install -e \".[docs]\"\n\n4. Build the docs\n\n.. code-block:: bash\n\n    cd docs\n    make html\n    open build/html/index.html\n\nHow to force rebuild of all figures and apidoc\n==============================================\n\n.. code-block:: bash\n\n    cd docs\n    make allclean\n\nUsing the ``make allclean`` command removes all auto-generated figures and rst files in the ``docs/source`` directory (specifically ``docs/source/code_stat_pages`` and ``docs/source/nwb_project_analytics.*rst``) as well as all builds from ``docs/builds``. When rebuilding the docs (e.g., via ``make html``) the files will be regenerated (using the data cached in ``data/``).\n\nHow to manually update the ``data/``\n==================================\n\nOn this repo, the information cached in ``data/`` is automatically updated nighlty by the `build_analytics_data.yml \u003chttps://github.com/NeurodataWithoutBorders/nwb-project-analytics/blob/main/.github/workflows/build_analytics_data.yml\u003e`_ GitHub Action. To manually update the statistics cached in ``data/``, simply remove the cached results and build the docs:\n\n.. code-block:: bash\n\n    rm data/cloc_stats.yaml\n    rm data/commit_stats.yaml\n    rm data/git_paths.yaml\n    rm data/release_timelines.yaml\n    rm data/contributors.tsv\n    cd docs\n    make html\n\nAfter completing the update, commit the updated data to the repo\n\n.. code-block:: bash\n\n    git commit -m \"Updated code statistics data\" ./data/*.yaml\n\nHow to add a new code\n=====================\n\nTo add a new entry to the ``NWBGitInfo.GIT_REPOS`` dictionary in ``src/nwb_project_analytics/gitstats.py``. The dictionary is used to track all main NWB repositories and stores for each repo a `` GitRepo`` object with basic metadata about the code (e.g., the location of the repo, name of the main branch, etc.). When adding a new code, all statistics need to be updated following the instructions above on **How to update the ``data/``**.\n\nHow are code statistcs computed?\n================================\n\nThe code uses the ``cloc`` tool to calculate line-of-code statistics. Computing ``cloc`` statistics for all codes is time-consuming as we need to compute them over time. This is accomplished by running ``cloc`` for all commits (or more accurately the last commit on each day) on the main branch of each code. The cloc results are saved in the ``data/`` folder to avoid unnecessary updates and safe time.\n\nHow to build custom analytics\n=============================\n\nThe ``nwb_project_analytics`` library includes a number of tools to help\nwith collecting and plotting data related to NWB code repositories. This includes for example:\n\n* ``nwb_project_analytics.codecovstats`` : Module for getting data from Codecov.io\n* ``nwb_project_analytics.codestats`` : Module for computing code statistics using CLOC\n* ``nwb_project_analytics.gitstats`` : Module to help query GitHub repos\n* ``nwb_project_analytics.renderstats module`` : Module for creating plots for code statistics\n* ``nwb_project_analytics.create_codestat_pages`` :  Module used to generate Sphinx documentation with code statistics\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurodatawithoutborders%2Fnwb-project-analytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneurodatawithoutborders%2Fnwb-project-analytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurodatawithoutborders%2Fnwb-project-analytics/lists"}