Skip to content

Commit bd656a4

Browse files
committed
readme
1 parent 7b67bb9 commit bd656a4

File tree

3 files changed

+49
-40
lines changed

3 files changed

+49
-40
lines changed

README.md

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e8a7a7448b2043d9bbefafc5a3ec14f7)](https://app.codacy.com/gh/TY-Cheng/torchvinecopulib/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
44
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/e8a7a7448b2043d9bbefafc5a3ec14f7)](https://app.codacy.com?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)
55
[![Lint Pytest](https://github.com/TY-Cheng/torchvinecopulib/actions/workflows/python-package.yml/badge.svg?branch=main)](https://github.com/TY-Cheng/torchvinecopulib/actions/workflows/python-package.yml)
6-
[![Deploy Docs](https://github.com/TY-Cheng/torchvinecopulib/actions/workflows/static.yml/badge.svg?branch=main)](https://github.com/TY-Cheng/torchvinecopulib/actions/workflows/static.yml)
6+
[![Deploy Docs](https://github.com/TY-Cheng/torchvinecopulib/actions/workflows/static.yml/badge.svg?branch=main)](https://ty-cheng.github.io/torchvinecopulib/)
77

88
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/torchvinecopulib)
99
[![OS](https://img.shields.io/badge/OS-Windows%7CmacOS%7CUbuntu-blue)](https://github.com/TY-Cheng/torchvinecopulib/actions/workflows/python-package.yml)
1010

11-
![GitHub License](https://img.shields.io/github/license/ty-cheng/torchvinecopulib)
12-
![PyPI - Version](https://img.shields.io/pypi/v/torchvinecopulib)
11+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/TY-Cheng/torchvinecopulib/blob/main/LICENSE)
12+
[![PyPI - Version](https://img.shields.io/pypi/v/torchvinecopulib)](https://pypi.org/project/torchvinecopulib/)
1313
[![DOI](https://zenodo.org/badge/768037665.svg)](https://zenodo.org/doi/10.5281/zenodo.10836953)
1414

1515
Yet another vine copula package, using [PyTorch](https://pytorch.org/get-started/locally/).
@@ -21,32 +21,9 @@ Yet another vine copula package, using [PyTorch](https://pytorch.org/get-started
2121
- Pure `Python` library, inspired by [pyvinecopulib](https://github.com/vinecopulib/pyvinecopulib/) on Windows, Linux, MacOS
2222
- IO and visualization support
2323

24-
## Dependencies
25-
26-
```toml
27-
# inside the `./pyproject.toml` file;
28-
fastkde = "*"
29-
numpy = "*"
30-
pyvinecopulib = "*"
31-
python = ">=3.12"
32-
scipy = "*"
33-
# optional to facilitate customization
34-
torch = [
35-
{ index = "torch-cpu", extra = "cpu" },
36-
{ index = "torch-cu126", extra = "cu126" },
37-
]
38-
```
39-
40-
For [PyTorch](https://pytorch.org/get-started/locally/) with `cuda`:
41-
42-
```bash
43-
pip install torch --index-url https://download.pytorch.org/whl/cu126 --force-reinstall
44-
# check cuda availability
45-
python -c "import torch; print(torch.cuda.is_available())"
46-
```
24+
## Examples
4725

48-
> [!TIP]
49-
> macOS users should set `device='cpu'` at this stage, for using `device='mps'` won't support `dtype=torch.float64`.
26+
Visit the [`./examples/`](https://github.com/TY-Cheng/torchvinecopulib/tree/main/examples) folder for `.ipynb` Jupyter notebooks.
5027

5128
## Installation
5229

@@ -66,7 +43,7 @@ pip install ./dist/torchvinecopulib-1.0.4-py3-none-any.whl
6643
pip install ./dist/torchvinecopulib-1.0.4.tar.gz
6744
```
6845

69-
### (Optional) [uv](https://docs.astral.sh/uv/getting-started/) for Dependency Management and Packaging
46+
### (Recommended) [uv](https://docs.astral.sh/uv/getting-started/) for Dependency Management and Packaging
7047

7148
After `git clone https://github.com/TY-Cheng/torchvinecopulib.git`, `cd` into the project root where [`pyproject.toml`](https://github.com/TY-Cheng/torchvinecopulib/blob/main/pyproject.toml) exists,
7249

@@ -77,9 +54,32 @@ uv sync --extra cpu -U
7754
uv sync --extra cu126 -U
7855
```
7956

80-
## Examples
57+
## Dependencies
8158

82-
Visit the [`./examples/`](https://github.com/TY-Cheng/torchvinecopulib/tree/main/examples) folder for `.ipynb` Jupyter notebooks.
59+
```toml
60+
# inside the `./pyproject.toml` file;
61+
fastkde = "*"
62+
numpy = "*"
63+
pyvinecopulib = "*"
64+
python = ">=3.12"
65+
scipy = "*"
66+
# optional to facilitate customization
67+
torch = [
68+
{ index = "torch-cpu", extra = "cpu" },
69+
{ index = "torch-cu126", extra = "cu126" },
70+
]
71+
```
72+
73+
For [PyTorch](https://pytorch.org/get-started/locally/) with `cuda`:
74+
75+
```bash
76+
pip install torch --index-url https://download.pytorch.org/whl/cu126 --force-reinstall
77+
# check cuda availability
78+
python -c "import torch; print(torch.cuda.is_available())"
79+
```
80+
81+
> [!TIP]
82+
> macOS users should set `device='cpu'` at this stage, for using `device='mps'` won't support `dtype=torch.float64`.
8383
8484
## Documentation
8585

@@ -90,6 +90,9 @@ Visit the [`./examples/`](https://github.com/TY-Cheng/torchvinecopulib/tree/main
9090
```bash
9191
# inside project root folder
9292
sphinx-apidoc -o ./docs ./torchvinecopulib && cd ./docs && make html && cd ..
93+
# if using uv
94+
uv run sphinx-apidoc -o docs torchvinecopulib/ --separate
95+
uv run sphinx-build docs docs/_build/html
9396
```
9497

9598
## Tests
@@ -99,6 +102,9 @@ sphinx-apidoc -o ./docs ./torchvinecopulib && cd ./docs && make html && cd ..
99102
python -m pytest ./tests
100103
# coverage report
101104
coverage run -m pytest ./tests && coverage html
105+
# if using uv
106+
uv run coverage run --source=torchvinecopulib -m pytest ./tests
107+
uv run coverage report -m
102108
```
103109

104110
## TODO

docs/index.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ Welcome to torchvinecopulib's documentation!
1010
.. raw:: html
1111

1212
<p align="center">
13-
<a href="https://app.codacy.com/gh/TY-Cheng/torchvinecopulib/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img src="https://app.codacy.com/project/badge/Grade/e8a7a7448b2043d9bbefafc5a3ec14f7" alt="Codacy Grade"/></a>
14-
<a href="https://app.codacy.com?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage"><img src="https://app.codacy.com/project/badge/Coverage/e8a7a7448b2043d9bbefafc5a3ec14f7" alt="Codacy Coverage"/></a>
15-
<a href="https://github.com/TY-Cheng/torchvinecopulib/actions/workflows/python-package.yml"><img src="https://github.com/TY-Cheng/torchvinecopulib/actions/workflows/python-package.yml/badge.svg?branch=main" alt="Lint Pytest"/></a>
16-
<a href="https://github.com/TY-Cheng/torchvinecopulib/actions/workflows/static.yml"><img src="https://github.com/TY-Cheng/torchvinecopulib/actions/workflows/static.yml/badge.svg?branch=main" alt="Deploy Docs"/></a>
13+
<a href="https://app.codacy.com/gh/TY-Cheng/torchvinecopulib/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade" target="_blank" rel="noopener noreferrer"><img src="https://app.codacy.com/project/badge/Grade/e8a7a7448b2043d9bbefafc5a3ec14f7" alt="Codacy Grade"/></a>
14+
<a href="https://app.codacy.com/gh/TY-Cheng/torchvinecopulib/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage" target="_blank" rel="noopener noreferrer"><img src="https://app.codacy.com/project/badge/Coverage/e8a7a7448b2043d9bbefafc5a3ec14f7" alt="Codacy Coverage"/></a>
15+
<a href="https://github.com/TY-Cheng/torchvinecopulib/actions/workflows/python-package.yml" target="_blank" rel="noopener noreferrer"><img src="https://github.com/TY-Cheng/torchvinecopulib/actions/workflows/python-package.yml/badge.svg?branch=main" alt="Lint Pytest"/></a>
16+
<a href="https://ty-cheng.github.io/torchvinecopulib/" target="_blank" rel="noopener noreferrer"><img src="https://github.com/TY-Cheng/torchvinecopulib/actions/workflows/static.yml/badge.svg?branch=main" alt="Deploy Docs"/></a>
1717
<br/>
1818
<img src="https://img.shields.io/pypi/pyversions/torchvinecopulib" alt="PyPI - Python Version"/>
19-
<img src="https://img.shields.io/badge/OS-Windows%7CmacOS%7CUbuntu-blue" alt="OS"/>
19+
<a href="https://github.com/TY-Cheng/torchvinecopulib/actions/workflows/python-package.yml" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/OS-Windows%7CmacOS%7CUbuntu-blue" alt="OS Compatibility"/></a>
2020
<br/>
21-
<a href="https://github.com/TY-Cheng/torchvinecopulib/blob/main/LICENSE"><img src="https://img.shields.io/github/license/ty-cheng/torchvinecopulib" alt="GitHub License"/></a>
22-
<a href="https://pypi.org/project/torchvinecopulib/"><img src="https://img.shields.io/pypi/v/torchvinecopulib" alt="PyPI - Version"/></a>
23-
<a href="https://zenodo.org/doi/10.5281/zenodo.10836953"><img src="https://zenodo.org/badge/768037665.svg" alt="DOI"/></a>
21+
<a href="https://github.com/TY-Cheng/torchvinecopulib/blob/main/LICENSE" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="GitHub License"/></a>
22+
<a href="https://pypi.org/project/torchvinecopulib/" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/pypi/v/torchvinecopulib" alt="PyPI - Version"/></a>
23+
<a href="https://zenodo.org/doi/10.5281/zenodo.10836953" target="_blank" rel="noopener noreferrer"><img src="https://zenodo.org/badge/768037665.svg" alt="DOI"/></a>
2424
</p>
2525

2626
``torchvinecopulib`` is a ``Python`` library for fitting and sampling vine copulas using ``PyTorch``.

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ classifiers = [
3939
"Operating System :: Microsoft :: Windows :: Windows 10",
4040
"Operating System :: POSIX :: Linux",
4141
"Operating System :: MacOS",
42-
"Programming Language :: Python :: 3",
42+
"Programming Language :: Python :: 3.12",
43+
"Programming Language :: Python :: 3.13",
44+
"Programming Language :: Python :: 3.14",
45+
"Programming Language :: Python :: 3.15",
4346
"Topic :: Scientific/Engineering",
4447
]
4548
dependencies = ["numpy>=2", "scipy", "fastkde", "pyvinecopulib"]

0 commit comments

Comments
 (0)