Name | cff-from-621 JSON |
Version |
0.1
JSON |
| download |
home_page | None |
Summary | Generates metadata in the Citation File Format for Python projects from their PEP-621 compliant package definition. Includes a CLI. |
upload_time | 2024-10-16 16:55:13 |
maintainer | None |
docs_url | None |
author | Frank Sachsenheim |
requires_python | >=3.10 |
license | None |
keywords |
pep-621
cff
conversion
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# cff-from-621
This tool derives a [`CITATION.cff`](https://citation-file-format.github.io/)
file from a Python project's `pyproject.toml` contents that provide
[PEP-621](https://peps.python.org/pep-0621/) compliant package metadata.
## Features
- Additional and overriding values can be provided statically or via Python
string templates.
- Order of the resulting fields can be defined, has a non-arbitrary default.
- Dynamic fields are resolved for the `setuptools` build backend.
## Example
Given a `pyproject.toml` that includes these contents:
```toml
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "cff-from-621"
description = "Generates metadata in the Citation File Format for Python projects from their PEP-621 compliant package definition. Includes a CLI."
keywords = ["PEP-621", "CFF", "conversion"]
authors = [
{name = "Frank Sachsenheim"}
]
dynamic = ["version"]
[tool.cff-from-621]
order = ["message", "cff-version", "title", "abstract", "version", "date-released", "authors", "keywords"]
[tool.cff-from-621.static]
date-released = "2022-09-18"
message = "🔥🌍🔥"
[tool.setuptools.dynamic]
version = {attr = "cff_from_621.version.VERSION"}
```
`cff-from-621` would derive this `CITATION.cff`:
```yaml
---
message: 🔥🌍🔥
cff-version: 1.2.0
title: cff-from-621
abstract: Generates metadata in the Citation File Format for Python projects from
their PEP-621 compliant package definition. Includes a CLI.
version: 0.0.1
date-released: '2022-09-18'
authors:
- name: Frank Sachsenheim
keywords:
- PEP-621
- CFF
- conversion
type: software
...
```
## Installation
Add `cff-from-621` with your environment management or install it globally
with [pipx](https://pypa.github.io/pipx/):
$ pipx install cff-from-621
## Usage
Change into your project's root folder and jump right in with:
$ cff-from-621
The usage details can be explored with:
$ cff-from-621 --help
### Caveats
1. Authors / maintainers are represented as [entity type](https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md#definitionsentity)
because their PEP-621 representation can't be parsed into the atomicity of the
[person type](https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md#definitionsperson).
## Development
This tool isn't supposed to cover each and every corner case that may exist.
Its implementation shall be kept simple and may be used as library for custom
extensions and alterations.
All contributions within that frame are welcome.
In a virtual environment that you set up for development, install this package
from source in editable mode and required development tools:
$ pip install .[development]
Make use of or refer to the accompanying [`justfile`](https://just.systems/) to
run common development tasks.
Raw data
{
"_id": null,
"home_page": null,
"name": "cff-from-621",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "PEP-621, CFF, conversion",
"author": "Frank Sachsenheim",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/83/8a/1ff3e53d3b3495dabf9aa1d378b90ee563cd3244bd16f128eb189b5337b5/cff_from_621-0.1.tar.gz",
"platform": null,
"description": "# cff-from-621\n\nThis tool derives a [`CITATION.cff`](https://citation-file-format.github.io/)\nfile from a Python project's `pyproject.toml` contents that provide\n[PEP-621](https://peps.python.org/pep-0621/) compliant package metadata.\n\n## Features\n\n- Additional and overriding values can be provided statically or via Python\n string templates.\n- Order of the resulting fields can be defined, has a non-arbitrary default.\n- Dynamic fields are resolved for the `setuptools` build backend.\n\n## Example\n\nGiven a `pyproject.toml` that includes these contents:\n\n```toml\n[build-system]\nrequires = [\"setuptools\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"cff-from-621\"\ndescription = \"Generates metadata in the Citation File Format for Python projects from their PEP-621 compliant package definition. Includes a CLI.\"\nkeywords = [\"PEP-621\", \"CFF\", \"conversion\"]\nauthors = [\n {name = \"Frank Sachsenheim\"}\n]\ndynamic = [\"version\"]\n\n[tool.cff-from-621]\norder = [\"message\", \"cff-version\", \"title\", \"abstract\", \"version\", \"date-released\", \"authors\", \"keywords\"]\n\n[tool.cff-from-621.static]\ndate-released = \"2022-09-18\"\nmessage = \"\ud83d\udd25\ud83c\udf0d\ud83d\udd25\"\n\n[tool.setuptools.dynamic]\nversion = {attr = \"cff_from_621.version.VERSION\"}\n```\n\n`cff-from-621` would derive this `CITATION.cff`:\n\n```yaml\n---\nmessage: \ud83d\udd25\ud83c\udf0d\ud83d\udd25\ncff-version: 1.2.0\ntitle: cff-from-621\nabstract: Generates metadata in the Citation File Format for Python projects from\n their PEP-621 compliant package definition. Includes a CLI.\nversion: 0.0.1\ndate-released: '2022-09-18'\nauthors:\n- name: Frank Sachsenheim\nkeywords:\n- PEP-621\n- CFF\n- conversion\ntype: software\n...\n```\n\n## Installation\n\nAdd `cff-from-621` with your environment management or install it globally\nwith [pipx](https://pypa.github.io/pipx/):\n\n $ pipx install cff-from-621\n\n## Usage\n\nChange into your project's root folder and jump right in with:\n\n $ cff-from-621\n\nThe usage details can be explored with:\n\n $ cff-from-621 --help\n\n### Caveats\n\n1. Authors / maintainers are represented as [entity type](https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md#definitionsentity)\n because their PEP-621 representation can't be parsed into the atomicity of the\n [person type](https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md#definitionsperson).\n\n## Development\n\nThis tool isn't supposed to cover each and every corner case that may exist.\nIts implementation shall be kept simple and may be used as library for custom\nextensions and alterations.\nAll contributions within that frame are welcome.\n\nIn a virtual environment that you set up for development, install this package\nfrom source in editable mode and required development tools:\n\n $ pip install .[development]\n\nMake use of or refer to the accompanying [`justfile`](https://just.systems/) to\nrun common development tasks.\n",
"bugtrack_url": null,
"license": null,
"summary": "Generates metadata in the Citation File Format for Python projects from their PEP-621 compliant package definition. Includes a CLI.",
"version": "0.1",
"project_urls": {
"Homepage": "https://pypi.org/project/cff-from-621/",
"Issue tracker": "https://github.com/delb-xml/cff-from-621/issues",
"Repository": "https://github.com/delb-xml/cff-from-621"
},
"split_keywords": [
"pep-621",
" cff",
" conversion"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "43df5b511f2b7efe579d6313cb33135a88d1fd494a9740b0206d5945e3792df5",
"md5": "68e8b9b1044e3f6e06ec1047a09059f4",
"sha256": "902ead16342ac6dffe615e2682c9c163295f09a0f1a6c9963c4635b29ede5a36"
},
"downloads": -1,
"filename": "cff_from_621-0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "68e8b9b1044e3f6e06ec1047a09059f4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 6929,
"upload_time": "2024-10-16T16:55:11",
"upload_time_iso_8601": "2024-10-16T16:55:11.819741Z",
"url": "https://files.pythonhosted.org/packages/43/df/5b511f2b7efe579d6313cb33135a88d1fd494a9740b0206d5945e3792df5/cff_from_621-0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "838a1ff3e53d3b3495dabf9aa1d378b90ee563cd3244bd16f128eb189b5337b5",
"md5": "17ac8cc53eafca93908b1f23e39032e6",
"sha256": "f3de79f3ccd18ee16822e2117b2349c5269078efab2b7eb21e25e2bce3618009"
},
"downloads": -1,
"filename": "cff_from_621-0.1.tar.gz",
"has_sig": false,
"md5_digest": "17ac8cc53eafca93908b1f23e39032e6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 6290,
"upload_time": "2024-10-16T16:55:13",
"upload_time_iso_8601": "2024-10-16T16:55:13.075665Z",
"url": "https://files.pythonhosted.org/packages/83/8a/1ff3e53d3b3495dabf9aa1d378b90ee563cd3244bd16f128eb189b5337b5/cff_from_621-0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-16 16:55:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "delb-xml",
"github_project": "cff-from-621",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "cff-from-621"
}