pinttrs

Pint meets attrs

https://github.com/rayference/pinttrs

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.5%) to scientific vocabulary

Keywords

attrs pint units
Last synced: 6 months ago · JSON representation ·

Repository

Pint meets attrs

Basic Info
Statistics
  • Stars: 5
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 13
Topics
attrs pint units
Created about 5 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog License Citation

README.md

Pinttrs

Pint meets attrs

PyPI version Conda version

GitHub Workflow Status (branch) Documentation Status

uv Ruff

Motivation

The amazing attrs library is a game-changer when it comes to writing classes. Its initialization sequence notably allows for automated conversion and verification of attribute values. This package is an attempt at designing a system to apply units automatically and reliably to attributes with Pint.

Features

  • Attach automatically units to unitless values passed to initialize an attribute
  • Verify unit compatibility when assigning a value to an attribute
  • Interpret units in dictionaries with a simple syntax
  • Define unit context to vary unitless value interpretation dynamically

Check the documentation for more detail.

License

Pinttrs is distributed under the terms of the MIT license.

About

Pinttrs is written and maintained by Vincent Leroy.

Development is supported by Rayference.

Pinttrs is a component of the Eradiate radiative transfer model.

The Pinttrs logo is based on Agus Nugroho's glass icon and parts of the attrs logo.

Owner

  • Name: Rayference
  • Login: rayference
  • Kind: organization
  • Location: Belgium

Citation (CITATION.cff)

cff-version: 1.2.0
title: Pinttrs
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Vincent
    family-names: Leroy
    email: vincent.leroy@rayference.eu
    affiliation: Rayference
    orcid: 'https://orcid.org/0000-0002-5407-0237'
repository-code: 'https://github.com/leroyvn/pinttrs'
url: 'https://pinttrs.readthedocs.io'
abstract: >-
  Pinttrs provides a way to apply units automatically and
  reliably to attrs attributes with Pint.
license: MIT

GitHub Events

Total
  • Release event: 1
  • Watch event: 1
  • Delete event: 4
  • Push event: 12
  • Pull request event: 4
  • Create event: 3
Last Year
  • Release event: 1
  • Watch event: 1
  • Delete event: 4
  • Push event: 12
  • Pull request event: 4
  • Create event: 3

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 minutes
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
Pull Request Authors
  • dependabot[bot] (4)
  • leroyvn (2)
Top Labels
Issue Labels
Pull Request Labels
dependencies (4) github_actions (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 1,881 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 16
  • Total maintainers: 1
pypi.org: pinttrs

Pint meets attrs.

  • Homepage: https://github.com/rayference/pinttrs
  • Documentation: https://pinttrs.readthedocs.io
  • License: MIT Copyright (c) 2021 Vincent Leroy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 25.1.0
    published 8 months ago
  • Versions: 16
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 1,881 Last month
Rankings
Dependent packages count: 4.8%
Downloads: 13.0%
Average: 18.5%
Dependent repos count: 21.6%
Stargazers count: 23.1%
Forks count: 29.8%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements/docs.txt pypi
  • furo >=2021.11
  • myst-parser >=0.16
  • sphinx >=4.5
  • sphinx-autobuild >=2021.3
  • sphinx-autodoc-typehints *
  • sphinx-copybutton >=0.4
.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v2 composite
  • actions/setup-python v2 composite
  • actions/upload-artifact v3 composite
  • actions/upload-artifact v2 composite
  • excitedleigh/setup-nox main composite
  • pdm-project/setup-pdm main composite
.github/workflows/release.yml actions
  • actions/checkout v3 composite
  • pdm-project/setup-pdm main composite
pyproject.toml pypi
  • attrs >=21.3
  • pint >=0.16