citecheck-0.3.0
توضیحات
Run-time protection of citation chains
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | citecheck-0.3.0 |
| نام | citecheck |
| نسخه کتابخانه | 0.3.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | Nathan McDougall <nathan.j.mcdougall@gmail.com> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/citecheck/ |
| مجوز | BSD-3-Clause |
<h1 align="center">
<img src="doc/source/_static/logo/full_dark.svg#gh-dark-mode-only"><br>
<img src="doc/source/_static/logo/full_light.svg#gh-light-mode-only"><br>
</h1>
# citecheck: like typechecks, but for citations 📖⛓️
<!-- badges: start -->
[](https://github.com/nathanjmcdougall/citecheck/blob/main/LICENSE.txt)
[](https://badge.fury.io/py/citecheck)
[](https://citecheck.readthedocs.io/en/latest/?badge=latest)
[](https://mypy-lang.org/)
[](https://github.com/charliermarsh/ruff)
[](https://github.com/PyCQA/pylint)
[](https://github.com/psf/black)
[](https://results.pre-commit.ci/latest/github/nathanjmcdougall/citecheck/main)
[](https://codecov.io/gh/nathanjmcdougall/citecheck)
[](https://pepy.tech/project/citecheck)
<!-- badges: end -->
## Quick example
Consider this example (all authors and quantities are fictitious):
- Doe (2021) published a method for estimating $V_t$ as a function of $q_p$ and $t$.
- Bloggs (2023) published a method for estimating $R_m$ as a function of $V_t$ and
$\rho$, with the explicit requirement that $V_t$ be estimated using the method of
Doe (2021) in particular.
The goal for citecheck is that you could implement this as follows:
```Python
from citecheck import enforcecite, Cite
@enforcecite
def calc_vt_doe2021(
qt: float,
t: float
) -> Annotated[float, Cite("doe2021")]:
...
@enforcecite
def calc_rm_bloggs2023(
vt: Annotated[float, Cite("doe2021")],
rho: float
) -> Annotated[float, Cite("bloggs2023")]:
...
```
Now, if we try to pass a value for $V_t$ that was not estimated using the method of Doe
(2021), we would get an error:
```Python
calc_rm_bloggs2023(vt=1.0, rho=1.0) # Error
calc_rm_bloggs2023(vt=calc_vt_doe2021(1.0, 1.0), rho=1.0) # OK
```
citecheck is still in development, but this is the general idea.
## When to use citecheck
You should consider using citecheck when you are implementing functions corresponding to
equations or methodologies in multiple papers which refer to one another.
## Getting Started with Development
Use Linux, install [`pyenv`](https://github.com/pyenv/pyenv), and then run the setup
script:
```bash
source .\scripts\dev-setup.sh
```
نیازمندی
| مقدار | نام |
|---|---|
| - | pre-commit |
| ==1.2.0 | mypy |
| - | pip-tools |
| - | setuptools-scm[toml] |
| ==23.3.0 | black |
| ==3.0.0a6 | pylint |
| ==0.0.263 | ruff |
| - | tomli |
| - | towncrier |
| - | sphinx |
| - | pydata-sphinx-theme |
| - | sphinx-copybutton |
| - | sphinx-design |
| - | sphinx-toggleprompt |
| - | sphinx-favicon |
| - | ipykernel |
| - | IPython |
| - | pytest |
| - | coverage[toml] |
| - | pytest-cov |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl citecheck-0.3.0:
pip install citecheck-0.3.0.whl
نصب پکیج tar.gz citecheck-0.3.0:
pip install citecheck-0.3.0.tar.gz