quink 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
quink-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.4
2
+ Name: quink
3
+ Version: 0.1.0
4
+ Summary: dark-research aesthetic for Python
5
+ Author: Lorenzo Santarsieri
6
+ License: MIT
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: scipy==1.15.3
10
+ Requires-Dist: numpy==2.2.6
11
+ Requires-Dist: matplotlib==3.10.8
12
+
13
+ # quink
14
+
15
+ <p align="center">
16
+ <img src="https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white" alt="Python">
17
+ <img src="https://img.shields.io/badge/NumPy-013243?style=for-the-badge&logo=numpy&logoColor=white" alt="NumPy">
18
+ <img src="https://img.shields.io/badge/SciPy-8CAAE6?style=for-the-badge&logo=scipy&logoColor=white" alt="SciPy">
19
+ <img src="https://img.shields.io/badge/Matplotlib-ffffff?style=for-the-badge&logo=plotly&logoColor=black" alt="Matplotlib">
20
+ </p>
21
+
22
+ <p align="center">
23
+ <i>
24
+ quink is a specialized Python visualization library designed for quantitative research. It bridges the gap between raw financial data and publication-ready charts, providing a "dark-research" aesthetic out of the box.
25
+ </i>
26
+ </p>
27
+
28
+ ### 📦 Installation (PyPI Package)
29
+ ------------
30
+ Install the package from **PyPI**:
31
+
32
+ ```bash
33
+ pip install quink
34
+ ```
35
+
36
+ ### 🪪 License
37
+ ------------
38
+ MIT © 2025 — Developed with ❤️ by Lorenzo Santarsieri
quink-0.1.0/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # quink
2
+
3
+ <p align="center">
4
+ <img src="https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white" alt="Python">
5
+ <img src="https://img.shields.io/badge/NumPy-013243?style=for-the-badge&logo=numpy&logoColor=white" alt="NumPy">
6
+ <img src="https://img.shields.io/badge/SciPy-8CAAE6?style=for-the-badge&logo=scipy&logoColor=white" alt="SciPy">
7
+ <img src="https://img.shields.io/badge/Matplotlib-ffffff?style=for-the-badge&logo=plotly&logoColor=black" alt="Matplotlib">
8
+ </p>
9
+
10
+ <p align="center">
11
+ <i>
12
+ quink is a specialized Python visualization library designed for quantitative research. It bridges the gap between raw financial data and publication-ready charts, providing a "dark-research" aesthetic out of the box.
13
+ </i>
14
+ </p>
15
+
16
+ ### 📦 Installation (PyPI Package)
17
+ ------------
18
+ Install the package from **PyPI**:
19
+
20
+ ```bash
21
+ pip install quink
22
+ ```
23
+
24
+ ### 🪪 License
25
+ ------------
26
+ MIT © 2025 — Developed with ❤️ by Lorenzo Santarsieri
@@ -0,0 +1,17 @@
1
+ [project]
2
+ name = "quink"
3
+ version = "0.1.0"
4
+ description = "dark-research aesthetic for Python"
5
+ readme = "README.md"
6
+ license = { text = "MIT" }
7
+ authors = [{ name = "Lorenzo Santarsieri" }]
8
+ requires-python = ">=3.10"
9
+ dependencies = [
10
+ "scipy==1.15.3",
11
+ "numpy==2.2.6",
12
+ "matplotlib==3.10.8"
13
+ ]
14
+
15
+ [build-system]
16
+ requires = ["setuptools>=61.0"]
17
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,7 @@
1
+ from .render import (
2
+ qq_plot
3
+ )
4
+
5
+ from .core import (
6
+ quink_setup
7
+ )
@@ -0,0 +1,12 @@
1
+ # Palette "Dark Research"
2
+ QUINK_COLORS = {
3
+ "bg_figure": "#0E0D0D",
4
+ "bg_axes": "#0C0C0C",
5
+ "dark_green": "#1B5E63",
6
+ "fancy_pink": "#E5A4C2",
7
+ }
8
+
9
+ PLOT_DEFAULTS = {
10
+ "figsize": (8, 6),
11
+ "dpi": 100,
12
+ }
@@ -0,0 +1,31 @@
1
+ # quink/viz/core.py
2
+ import matplotlib.pyplot as plt
3
+ from .config import QUINK_COLORS
4
+
5
+ def apply_quink_theme():
6
+ """Apply dark research style"""
7
+ plt.style.use("dark_background")
8
+ plt.rcParams.update({
9
+ 'figure.facecolor': QUINK_COLORS["bg_figure"],
10
+ 'axes.facecolor': QUINK_COLORS["bg_axes"],
11
+ })
12
+
13
+
14
+ def quink_setup(figsize=(8, 6), **kwargs):
15
+ """
16
+ Create a standard baseline for plots
17
+ """
18
+ apply_quink_theme()
19
+
20
+ fig, ax = plt.subplots(
21
+ figsize=figsize,
22
+ **kwargs
23
+ )
24
+
25
+ ax.grid(
26
+ linestyle=":",
27
+ zorder=0,
28
+ alpha=0.3
29
+ )
30
+
31
+ return fig, ax
@@ -0,0 +1,82 @@
1
+ from typing import Optional, Tuple
2
+ from .config import QUINK_COLORS
3
+ import matplotlib.pyplot as plt
4
+ from .core import quink_setup
5
+ from scipy import stats
6
+ import numpy as np
7
+
8
+
9
+ def qq_plot(
10
+ y: np.ndarray,
11
+ dist: str = "normal",
12
+ df: Optional[float] = None,
13
+ figsize: Tuple[int, int] = (6, 5),
14
+ scatter_color: str = "#1B5E63",
15
+ line_color: str = "#E5A4C2",
16
+ xlabel: Optional[str] = None,
17
+ ylabel: Optional[str] = None,
18
+ title: Optional[str] = None,
19
+ show: bool = True,
20
+ dpi: int =100,
21
+ ) -> plt.Figure | None:
22
+ """
23
+ Generate a QQ plot against a theoretical distribution.
24
+ """
25
+ y = np.asarray(y)
26
+ y = np.sort(y)
27
+ n = len(y)
28
+
29
+ probs = (np.arange(1, n + 1) - 0.5) / n
30
+
31
+ if dist == "normal":
32
+ theoretical_q = stats.norm.ppf(probs)
33
+ default_title = "QQ Plot vs Normal"
34
+
35
+ elif dist == "t":
36
+ if df is None:
37
+ raise ValueError("df must be provided for t distribution.")
38
+ theoretical_q = stats.t.ppf(probs, df=df)
39
+ default_title = f"QQ Plot vs t (df={df})"
40
+
41
+ else:
42
+ raise ValueError("dist must be 'normal' or 't'.")
43
+
44
+ fig, ax = quink_setup(figsize=figsize, dpi=dpi)
45
+
46
+ ax.plot(
47
+ theoretical_q,
48
+ theoretical_q,
49
+ color=QUINK_COLORS["fancy_pink"],
50
+ zorder=3,
51
+ )
52
+
53
+ ax.scatter(
54
+ theoretical_q,
55
+ y,
56
+ color=QUINK_COLORS["dark_green"],
57
+ linewidths=0.3,
58
+ alpha=0.6,
59
+ zorder=4,
60
+ )
61
+
62
+ ax.set_xlabel(
63
+ xlabel if xlabel is not None
64
+ else "Theoretical Quantiles"
65
+ )
66
+
67
+ ax.set_ylabel(
68
+ ylabel if ylabel is not None
69
+ else "Empirical Quantiles"
70
+ )
71
+
72
+ ax.set_title(
73
+ title if title is not None
74
+ else default_title
75
+ )
76
+
77
+ if show:
78
+ plt.show()
79
+ return None
80
+
81
+ plt.close(fig)
82
+ return fig
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.4
2
+ Name: quink
3
+ Version: 0.1.0
4
+ Summary: dark-research aesthetic for Python
5
+ Author: Lorenzo Santarsieri
6
+ License: MIT
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: scipy==1.15.3
10
+ Requires-Dist: numpy==2.2.6
11
+ Requires-Dist: matplotlib==3.10.8
12
+
13
+ # quink
14
+
15
+ <p align="center">
16
+ <img src="https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white" alt="Python">
17
+ <img src="https://img.shields.io/badge/NumPy-013243?style=for-the-badge&logo=numpy&logoColor=white" alt="NumPy">
18
+ <img src="https://img.shields.io/badge/SciPy-8CAAE6?style=for-the-badge&logo=scipy&logoColor=white" alt="SciPy">
19
+ <img src="https://img.shields.io/badge/Matplotlib-ffffff?style=for-the-badge&logo=plotly&logoColor=black" alt="Matplotlib">
20
+ </p>
21
+
22
+ <p align="center">
23
+ <i>
24
+ quink is a specialized Python visualization library designed for quantitative research. It bridges the gap between raw financial data and publication-ready charts, providing a "dark-research" aesthetic out of the box.
25
+ </i>
26
+ </p>
27
+
28
+ ### 📦 Installation (PyPI Package)
29
+ ------------
30
+ Install the package from **PyPI**:
31
+
32
+ ```bash
33
+ pip install quink
34
+ ```
35
+
36
+ ### 🪪 License
37
+ ------------
38
+ MIT © 2025 — Developed with ❤️ by Lorenzo Santarsieri
@@ -0,0 +1,11 @@
1
+ README.md
2
+ pyproject.toml
3
+ quink/__init__.py
4
+ quink/config.py
5
+ quink/core.py
6
+ quink/render.py
7
+ quink.egg-info/PKG-INFO
8
+ quink.egg-info/SOURCES.txt
9
+ quink.egg-info/dependency_links.txt
10
+ quink.egg-info/requires.txt
11
+ quink.egg-info/top_level.txt
@@ -0,0 +1,3 @@
1
+ scipy==1.15.3
2
+ numpy==2.2.6
3
+ matplotlib==3.10.8
@@ -0,0 +1 @@
1
+ quink
quink-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+