Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors:
repository-code: >-
https://github.com/willynilly/parsnips
abstract: >-
Create SWHIDs for Python classes, functions, and other source code fragments based on its abstract syntax tree.
Generate, search, and cite SWHIDs for Python code fragments like classes, functions, and expressions.
keywords:
- SWHID
- Software Heritage
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Parsnips

Create SWHIDs for Python classes, functions, and other source code fragments based on their abstract syntax tree (AST).
Generate, search, and cite SWHIDs for Python code fragments like classes, functions, and expressions.

## Overview

**Parsnips** is a Python tool that analyzes Python source files using the built-in `ast` module and `asttokens` to create fine-grained, reproducible identifiers for fragments of Python code. It is designed to support persistent software identifiers (SWHIDs) for structural code elements such as:
**Parsnips** is a Python tool that analyzes source files to create a citable hierarchy of folders and metadata files representing nodes in a parsed abstract syntax tree (AST). AST nodes correspond to meaningful code fragments such as classes, functions, and expressions. The metadata files and folders can be stored in your repository. If you archive your repository on Software Heritage, you can then retrieve and cite the SWHIDs for these fragments.

Parsnips uses the built-in `ast` module and `asttokens` to create fine-grained, reproducible identifiers for fragments of Python code. It is designed to support persistent software identifiers (SWHIDs) for structural code elements such as:

- Functions
- Classes
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "hatchling.build"
[project]
name = "parsnips"
version = "2.0.1"
description = "Create SWHIDs for Python classes, functions, and other source code fragments based on its abstract syntax tree."
description = "Generate, search, and cite SWHIDs for Python code fragments like classes, functions, and expressions."
readme = "README.md"
requires-python = ">=3.12"
license = "Apache-2.0"
Expand Down