hatch-datadog-build-metadata


Namehatch-datadog-build-metadata JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryHatch build plugin for source code metadata used by APM
upload_time2023-04-14 16:39:55
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords apm datadog git hatch plugin tracing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # hatch-datadog-build-metadata

| | |
| --- | --- |
| CI/CD | [![CI - Test](https://github.com/DataDog/hatch-datadog-build-metadata/actions/workflows/test.yml/badge.svg)](https://github.com/DataDog/hatch-datadog-build-metadata/actions/workflows/test.yml) [![CD - Build](https://github.com/DataDog/hatch-datadog-build-metadata/actions/workflows/build.yml/badge.svg)](https://github.com/DataDog/hatch-datadog-build-metadata/actions/workflows/build.yml) |
| Package | [![PyPI - Version](https://img.shields.io/pypi/v/hatch-datadog-build-metadata.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/hatch-datadog-build-metadata/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hatch-datadog-build-metadata.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/hatch-datadog-build-metadata/) |
| Meta | [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![code style - black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/ambv/black) [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/) |

-----

This provides a plugin for [Hatch](https://github.com/pypa/hatch) that injects metadata from your preferred version control system like Git.

**Table of Contents**

- [Global dependency](#global-dependency)
- [Metadata hook](#metadata-hook)
  - [Metadata hook options](#metadata-hook-options)
    - [URLs](#urls)
  - [Example](#example)
- [License](#license)

## Global dependency

Ensure `hatch-datadog-build-metadata` is defined within the `build-system.requires` field in your `pyproject.toml` file.

```toml
[build-system]
requires = ["hatchling", "hatch-datadog-build-metadata"]
build-backend = "hatchling.build"
```

## Metadata hook

**Note:** only Git is supported

The [metadata hook plugin](https://hatch.pypa.io/latest/plugins/metadata-hook/reference/) name is `datadog-build-metadata`.

- ***pyproject.toml***

    ```toml
    [tool.hatch.metadata.hooks.datadog-build-metadata]
    ```

### Metadata hook options

#### URLs

The `urls` option is equivalent to [`project.urls`](https://hatch.pypa.io/latest/config/metadata/#urls) except that each URL supports [context formatting](https://hatch.pypa.io/latest/config/context/) with the following fields:

- `commit_hash` - the latest commit hash
- `remote_url` - the raw remote URL as stored in VCS config
- `remote_http_url` - the `remote_url` converted to an HTTP(S) URL

Be sure to add `urls` to [`project.dynamic`](https://hatch.pypa.io/latest/config/metadata/#dynamic):

- ***pyproject.toml***

    ```toml
    [project]
    dynamic = [
      "urls",
    ]
    ```

By default, the following URLs are set:

- `source_code_link` -> `{remote_http_url}#{commit_hash}`

### Example

The following example assumes that the code is hosted by GitHub.

- ***pyproject.toml***

    ```toml
    [tool.hatch.metadata.hooks.datadog-build-metadata]
    Homepage = "https://www.example.com"
    source_archive = "{remote_http_url}/archive/{commit_hash}.tar.gz"
    ```

- ***hatch.toml***

    ```toml
    [metadata.hooks.datadog-build-metadata]
    Homepage = "https://www.example.com"
    source_archive = "{remote_http_url}/archive/{commit_hash}.tar.gz"
    ```

## License

`hatch-datadog-build-metadata` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "hatch-datadog-build-metadata",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "apm,datadog,git,hatch,plugin,tracing",
    "author": "",
    "author_email": "\"Datadog, Inc.\" <dev@datadoghq.com>",
    "download_url": "https://files.pythonhosted.org/packages/48/ef/b9d3046fed954d022d82f9ca98f3c35f027d18e8060e3761715dbbaec381/hatch_datadog_build_metadata-0.1.0.tar.gz",
    "platform": null,
    "description": "# hatch-datadog-build-metadata\n\n| | |\n| --- | --- |\n| CI/CD | [![CI - Test](https://github.com/DataDog/hatch-datadog-build-metadata/actions/workflows/test.yml/badge.svg)](https://github.com/DataDog/hatch-datadog-build-metadata/actions/workflows/test.yml) [![CD - Build](https://github.com/DataDog/hatch-datadog-build-metadata/actions/workflows/build.yml/badge.svg)](https://github.com/DataDog/hatch-datadog-build-metadata/actions/workflows/build.yml) |\n| Package | [![PyPI - Version](https://img.shields.io/pypi/v/hatch-datadog-build-metadata.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/hatch-datadog-build-metadata/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hatch-datadog-build-metadata.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/hatch-datadog-build-metadata/) |\n| Meta | [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![code style - black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/ambv/black) [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/) |\n\n-----\n\nThis provides a plugin for [Hatch](https://github.com/pypa/hatch) that injects metadata from your preferred version control system like Git.\n\n**Table of Contents**\n\n- [Global dependency](#global-dependency)\n- [Metadata hook](#metadata-hook)\n  - [Metadata hook options](#metadata-hook-options)\n    - [URLs](#urls)\n  - [Example](#example)\n- [License](#license)\n\n## Global dependency\n\nEnsure `hatch-datadog-build-metadata` is defined within the `build-system.requires` field in your `pyproject.toml` file.\n\n```toml\n[build-system]\nrequires = [\"hatchling\", \"hatch-datadog-build-metadata\"]\nbuild-backend = \"hatchling.build\"\n```\n\n## Metadata hook\n\n**Note:** only Git is supported\n\nThe [metadata hook plugin](https://hatch.pypa.io/latest/plugins/metadata-hook/reference/) name is `datadog-build-metadata`.\n\n- ***pyproject.toml***\n\n    ```toml\n    [tool.hatch.metadata.hooks.datadog-build-metadata]\n    ```\n\n### Metadata hook options\n\n#### URLs\n\nThe `urls` option is equivalent to [`project.urls`](https://hatch.pypa.io/latest/config/metadata/#urls) except that each URL supports [context formatting](https://hatch.pypa.io/latest/config/context/) with the following fields:\n\n- `commit_hash` - the latest commit hash\n- `remote_url` - the raw remote URL as stored in VCS config\n- `remote_http_url` - the `remote_url` converted to an HTTP(S) URL\n\nBe sure to add `urls` to [`project.dynamic`](https://hatch.pypa.io/latest/config/metadata/#dynamic):\n\n- ***pyproject.toml***\n\n    ```toml\n    [project]\n    dynamic = [\n      \"urls\",\n    ]\n    ```\n\nBy default, the following URLs are set:\n\n- `source_code_link` -> `{remote_http_url}#{commit_hash}`\n\n### Example\n\nThe following example assumes that the code is hosted by GitHub.\n\n- ***pyproject.toml***\n\n    ```toml\n    [tool.hatch.metadata.hooks.datadog-build-metadata]\n    Homepage = \"https://www.example.com\"\n    source_archive = \"{remote_http_url}/archive/{commit_hash}.tar.gz\"\n    ```\n\n- ***hatch.toml***\n\n    ```toml\n    [metadata.hooks.datadog-build-metadata]\n    Homepage = \"https://www.example.com\"\n    source_archive = \"{remote_http_url}/archive/{commit_hash}.tar.gz\"\n    ```\n\n## License\n\n`hatch-datadog-build-metadata` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Hatch build plugin for source code metadata used by APM",
    "version": "0.1.0",
    "split_keywords": [
        "apm",
        "datadog",
        "git",
        "hatch",
        "plugin",
        "tracing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ac9d0e6bd2d080f9daf0bac232f10cb0eea4d23217a0cad33e3406bb82e15e28",
                "md5": "1bded42446f4853d47c39848e30db088",
                "sha256": "1a1a0806e38d6de90bbde8ab1b0aa20a0323c1815c2cb7ea1e10ce4dbc0004f2"
            },
            "downloads": -1,
            "filename": "hatch_datadog_build_metadata-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1bded42446f4853d47c39848e30db088",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 6554,
            "upload_time": "2023-04-14T16:39:54",
            "upload_time_iso_8601": "2023-04-14T16:39:54.499275Z",
            "url": "https://files.pythonhosted.org/packages/ac/9d/0e6bd2d080f9daf0bac232f10cb0eea4d23217a0cad33e3406bb82e15e28/hatch_datadog_build_metadata-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "48efb9d3046fed954d022d82f9ca98f3c35f027d18e8060e3761715dbbaec381",
                "md5": "09f21da84a660a229a9cea81868056dd",
                "sha256": "1d9e18f4351ef0fcef20ccda16befdcd6df3826b2bc95cf9411516ce3483a6b1"
            },
            "downloads": -1,
            "filename": "hatch_datadog_build_metadata-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "09f21da84a660a229a9cea81868056dd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8409,
            "upload_time": "2023-04-14T16:39:55",
            "upload_time_iso_8601": "2023-04-14T16:39:55.603109Z",
            "url": "https://files.pythonhosted.org/packages/48/ef/b9d3046fed954d022d82f9ca98f3c35f027d18e8060e3761715dbbaec381/hatch_datadog_build_metadata-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-14 16:39:55",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "hatch-datadog-build-metadata"
}
        
Elapsed time: 0.57043s