{"id":21245843,"url":"https://github.com/ncoop57/function_parser","last_synced_at":"2025-10-11T05:42:39.429Z","repository":{"id":40566346,"uuid":"327753928","full_name":"ncoop57/function_parser","owner":"ncoop57","description":"Fork of the awesome function_parser library from Github's CodeSearchNet Challenge repo: https://github.com/github/CodeSearchNet/tree/master/function_parser","archived":false,"fork":false,"pushed_at":"2023-02-26T05:13:42.000Z","size":1123,"stargazers_count":29,"open_issues_count":2,"forks_count":14,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-16T21:45:42.978Z","etag":null,"topics":["codesearchnet","function-parser","nbdev","source-code"],"latest_commit_sha":null,"homepage":"https://nathancooper.io/function_parser/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ncoop57.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2021-01-08T00:05:33.000Z","updated_at":"2025-07-10T17:47:48.000Z","dependencies_parsed_at":"2025-07-10T22:37:09.628Z","dependency_job_id":"e904618e-f2ba-4d0b-b59c-d0da1afe1931","html_url":"https://github.com/ncoop57/function_parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"fastai/nbdev_template","purl":"pkg:github/ncoop57/function_parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncoop57%2Ffunction_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncoop57%2Ffunction_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncoop57%2Ffunction_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncoop57%2Ffunction_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ncoop57","download_url":"https://codeload.github.com/ncoop57/function_parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncoop57%2Ffunction_parser/sbom","scorecard":{"id":677481,"data":{"date":"2025-08-11","repo":{"name":"github.com/ncoop57/function_parser","commit":"191d16967c53fc256fb6cfc45243301abbd452e7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 2/9 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:7: update your workflow using https://app.stepsecurity.io/secureworkflow/ncoop57/function_parser/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/ncoop57/function_parser/main.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:14","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:15","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"41 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-cr5q-6q9f-rq6q","Warn: Project is vulnerable to: GHSA-j6gc-792m-qgm2","Warn: Project is vulnerable to: GHSA-pj73-v5mw-pm9j","Warn: Project is vulnerable to: GHSA-jxhc-q857-3j6g","Warn: Project is vulnerable to: GHSA-48wp-p9qv-4j64","Warn: Project is vulnerable to: GHSA-4qw4-jpp4-8gvp","Warn: Project is vulnerable to: GHSA-636f-xm5j-pj9m","Warn: Project is vulnerable to: GHSA-7vh7-fw88-wj87","Warn: Project is vulnerable to: GHSA-fmx4-26r3-wxpf","Warn: Project is vulnerable to: GHSA-52p9-v744-mwjj","Warn: Project is vulnerable to: GHSA-286v-pcf5-25rc","Warn: Project is vulnerable to: GHSA-2qc6-mcvw-92cw","Warn: Project is vulnerable to: GHSA-2rr5-8q37-2w7h","Warn: Project is vulnerable to: GHSA-353f-x4gh-cqq8","Warn: Project is vulnerable to: GHSA-59gp-qqm7-cw4j","Warn: Project is vulnerable to: GHSA-5w6v-399v-w3cc","Warn: Project is vulnerable to: GHSA-7rrm-v45f-jp64","Warn: Project is vulnerable to: GHSA-cgx6-hpwq-fhv5","Warn: Project is vulnerable to: GHSA-crjr-9rc5-ghw8","Warn: Project is vulnerable to: GHSA-fq42-c5rg-92c2","Warn: Project is vulnerable to: GHSA-gx8x-g87m-h5q6","Warn: Project is vulnerable to: GHSA-jc36-42cf-vqwj","Warn: Project is vulnerable to: GHSA-jw9f-hh49-cvp9","Warn: Project is vulnerable to: GHSA-mrxw-mxhj-p664","Warn: Project is vulnerable to: GHSA-pxvg-2qj5-37jq","Warn: Project is vulnerable to: GHSA-r95h-9x8f-r3f7","Warn: Project is vulnerable to: GHSA-v4f8-2847-rwm7","Warn: Project is vulnerable to: GHSA-v6gp-9mmm-c6p5","Warn: Project is vulnerable to: GHSA-vr8q-g5c7-m54m","Warn: Project is vulnerable to: GHSA-vvfq-8hwr-qm4m","Warn: Project is vulnerable to: GHSA-xc9x-jj77-9p9j","Warn: Project is vulnerable to: GHSA-xh29-r2w5-wx8m","Warn: Project is vulnerable to: GHSA-xxx9-3xcr-gjj3","Warn: Project is vulnerable to: GHSA-2rxp-v6pw-ch6m","Warn: Project is vulnerable to: GHSA-4xqq-m2hx-25v8","Warn: Project is vulnerable to: GHSA-5866-49gr-22v4","Warn: Project is vulnerable to: GHSA-8cr8-4vfw-mr7h","Warn: Project is vulnerable to: GHSA-r55c-59qm-vjw6","Warn: Project is vulnerable to: GHSA-vg3r-rm7w-2xgh","Warn: Project is vulnerable to: GHSA-vmwr-mc7x-5vc3","Warn: Project is vulnerable to: GHSA-5cm2-9h8c-rvfx"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T21:57:51.968Z","repository_id":40566346,"created_at":"2025-08-21T21:57:51.968Z","updated_at":"2025-08-21T21:57:51.968Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006356,"owners_count":26084087,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["codesearchnet","function-parser","nbdev","source-code"],"created_at":"2024-11-21T02:00:35.926Z","updated_at":"2025-10-11T05:42:39.407Z","avatar_url":"https://github.com/ncoop57.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# function_parser\n\u003e This library contains various utils to parse GitHub repositories into function definition and docstring pairs. It is based on tree-sitter to parse code into ASTs and apply heuristics to parse metadata in more details. Currently, it supports 6 languages: Python, Java, Go, Php, Ruby, and Javascript. It also parses function calls and links them with their definitions for Python.\n\n\n## Install\n\n`pip install function-parser`\n\n## How to use\n\nIn order to use the library you must download and build the language grammars for `tree-sitter` to parser source code with. Included in the library is a handy CLI tool for setting this up.\n\nTo download and build grammars: `build_grammars`\n\nThis command will download and build the grammars in the same location this python library was installed on your computer after pip installing.\n\n```python\nimport function_parser\nimport os\n\nimport pandas as pd\n\nfrom function_parser.language_data import LANGUAGE_METADATA\nfrom function_parser.process import DataProcessor\nfrom tree_sitter import Language\n\nlanguage = \"python\"\nDataProcessor.PARSER.set_language(\n    Language(os.path.join(function_parser.__path__[0], \"tree-sitter-languages.so\"), language)\n)\nprocessor = DataProcessor(\n    language=language, language_parser=LANGUAGE_METADATA[language][\"language_parser\"]\n)\n\ndependee = \"keras-team/keras\"\ndefinitions = processor.process_dee(dependee, ext=LANGUAGE_METADATA[language][\"ext\"])\npd.DataFrame(definitions).head()\n```\n\n\n\n\n\u003cdiv\u003e\n\u003cstyle scoped\u003e\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n\u003c/style\u003e\n\u003ctable border=\"1\" class=\"dataframe\"\u003e\n  \u003cthead\u003e\n    \u003ctr style=\"text-align: right;\"\u003e\n      \u003cth\u003e\u003c/th\u003e\n      \u003cth\u003enwo\u003c/th\u003e\n      \u003cth\u003esha\u003c/th\u003e\n      \u003cth\u003epath\u003c/th\u003e\n      \u003cth\u003elanguage\u003c/th\u003e\n      \u003cth\u003eidentifier\u003c/th\u003e\n      \u003cth\u003eparameters\u003c/th\u003e\n      \u003cth\u003eargument_list\u003c/th\u003e\n      \u003cth\u003ereturn_statement\u003c/th\u003e\n      \u003cth\u003edocstring\u003c/th\u003e\n      \u003cth\u003edocstring_summary\u003c/th\u003e\n      \u003cth\u003edocstring_tokens\u003c/th\u003e\n      \u003cth\u003efunction\u003c/th\u003e\n      \u003cth\u003efunction_tokens\u003c/th\u003e\n      \u003cth\u003eurl\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003e0\u003c/th\u003e\n      \u003ctd\u003ekeras-team/keras\u003c/td\u003e\n      \u003ctd\u003ee43af6c89cd6c4adecc21ad5fc05b21e7fa9477b\u003c/td\u003e\n      \u003ctd\u003ekeras/backend.py\u003c/td\u003e\n      \u003ctd\u003epython\u003c/td\u003e\n      \u003ctd\u003ebackend\u003c/td\u003e\n      \u003ctd\u003e()\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003ereturn 'tensorflow'\u003c/td\u003e\n      \u003ctd\u003ePublicly accessible method for determining the...\u003c/td\u003e\n      \u003ctd\u003ePublicly accessible method for determining the...\u003c/td\u003e\n      \u003ctd\u003e[Publicly, accessible, method, for, determinin...\u003c/td\u003e\n      \u003ctd\u003edef backend():\\n  \"\"\"Publicly accessible metho...\u003c/td\u003e\n      \u003ctd\u003e[def, backend, (, ), :, return, 'tensorflow']\u003c/td\u003e\n      \u003ctd\u003ehttps://github.com/keras-team/keras/blob/e43af...\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e1\u003c/th\u003e\n      \u003ctd\u003ekeras-team/keras\u003c/td\u003e\n      \u003ctd\u003ee43af6c89cd6c4adecc21ad5fc05b21e7fa9477b\u003c/td\u003e\n      \u003ctd\u003ekeras/backend.py\u003c/td\u003e\n      \u003ctd\u003epython\u003c/td\u003e\n      \u003ctd\u003ecast_to_floatx\u003c/td\u003e\n      \u003ctd\u003e(x)\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003ereturn np.asarray(x, dtype=floatx())\u003c/td\u003e\n      \u003ctd\u003eCast a Numpy array to the default Keras float ...\u003c/td\u003e\n      \u003ctd\u003eCast a Numpy array to the default Keras float ...\u003c/td\u003e\n      \u003ctd\u003e[Cast, a, Numpy, array, to, the, default, Kera...\u003c/td\u003e\n      \u003ctd\u003edef cast_to_floatx(x):\\n  \"\"\"Cast a Numpy arra...\u003c/td\u003e\n      \u003ctd\u003e[def, cast_to_floatx, (, x, ), :, if, isinstan...\u003c/td\u003e\n      \u003ctd\u003ehttps://github.com/keras-team/keras/blob/e43af...\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2\u003c/th\u003e\n      \u003ctd\u003ekeras-team/keras\u003c/td\u003e\n      \u003ctd\u003ee43af6c89cd6c4adecc21ad5fc05b21e7fa9477b\u003c/td\u003e\n      \u003ctd\u003ekeras/backend.py\u003c/td\u003e\n      \u003ctd\u003epython\u003c/td\u003e\n      \u003ctd\u003eget_uid\u003c/td\u003e\n      \u003ctd\u003e(prefix='')\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003ereturn layer_name_uids[prefix]\u003c/td\u003e\n      \u003ctd\u003eAssociates a string prefix with an integer cou...\u003c/td\u003e\n      \u003ctd\u003eAssociates a string prefix with an integer cou...\u003c/td\u003e\n      \u003ctd\u003e[Associates, a, string, prefix, with, an, inte...\u003c/td\u003e\n      \u003ctd\u003edef get_uid(prefix=''):\\n  \"\"\"Associates a str...\u003c/td\u003e\n      \u003ctd\u003e[def, get_uid, (, prefix, =, '', ), :, graph, ...\u003c/td\u003e\n      \u003ctd\u003ehttps://github.com/keras-team/keras/blob/e43af...\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e3\u003c/th\u003e\n      \u003ctd\u003ekeras-team/keras\u003c/td\u003e\n      \u003ctd\u003ee43af6c89cd6c4adecc21ad5fc05b21e7fa9477b\u003c/td\u003e\n      \u003ctd\u003ekeras/backend.py\u003c/td\u003e\n      \u003ctd\u003epython\u003c/td\u003e\n      \u003ctd\u003ereset_uids\u003c/td\u003e\n      \u003ctd\u003e()\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eResets graph identifiers.\u003c/td\u003e\n      \u003ctd\u003eResets graph identifiers.\u003c/td\u003e\n      \u003ctd\u003e[Resets, graph, identifiers, .]\u003c/td\u003e\n      \u003ctd\u003edef reset_uids():\\n  \"\"\"Resets graph identifie...\u003c/td\u003e\n      \u003ctd\u003e[def, reset_uids, (, ), :, PER_GRAPH_OBJECT_NA...\u003c/td\u003e\n      \u003ctd\u003ehttps://github.com/keras-team/keras/blob/e43af...\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e4\u003c/th\u003e\n      \u003ctd\u003ekeras-team/keras\u003c/td\u003e\n      \u003ctd\u003ee43af6c89cd6c4adecc21ad5fc05b21e7fa9477b\u003c/td\u003e\n      \u003ctd\u003ekeras/backend.py\u003c/td\u003e\n      \u003ctd\u003epython\u003c/td\u003e\n      \u003ctd\u003eclear_session\u003c/td\u003e\n      \u003ctd\u003e()\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eResets all state generated by Keras.\\n\\n  Kera...\u003c/td\u003e\n      \u003ctd\u003eResets all state generated by Keras.\u003c/td\u003e\n      \u003ctd\u003e[Resets, all, state, generated, by, Keras, .]\u003c/td\u003e\n      \u003ctd\u003edef clear_session():\\n  \"\"\"Resets all state ge...\u003c/td\u003e\n      \u003ctd\u003e[def, clear_session, (, ), :, global, _SESSION...\u003c/td\u003e\n      \u003ctd\u003ehttps://github.com/keras-team/keras/blob/e43af...\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncoop57%2Ffunction_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fncoop57%2Ffunction_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncoop57%2Ffunction_parser/lists"}