scales-python 1.4.0.9000__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.
@@ -0,0 +1,15 @@
1
+ # GitHub language statistics: only count Python
2
+ *.py linguist-detectable
3
+ *.ipynb linguist-documentation
4
+ *.html linguist-documentation
5
+ *.css linguist-documentation
6
+ *.js linguist-documentation
7
+ *.json linguist-documentation
8
+ *.yml linguist-documentation
9
+ *.yaml linguist-documentation
10
+ *.md linguist-documentation
11
+ *.R linguist-documentation
12
+ *.csv linguist-documentation
13
+ site/** linguist-documentation
14
+ docs/** linguist-documentation
15
+ tutorials/** linguist-documentation
@@ -0,0 +1,26 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .eggs/
8
+
9
+ # Virtual environments
10
+ .venv/
11
+ .tox/
12
+
13
+ # Compiled extensions
14
+ *.so
15
+ *.pyd
16
+ *.dylib
17
+
18
+ # IDE
19
+ .idea/
20
+ .vscode/
21
+ *.swp
22
+
23
+ # OS
24
+ .DS_Store
25
+ Thumbs.db
26
+ .coverage
@@ -0,0 +1,3 @@
1
+ # MIT
2
+
3
+ See DESCRIPTION from R package.
@@ -0,0 +1,73 @@
1
+ Metadata-Version: 2.4
2
+ Name: scales-python
3
+ Version: 1.4.0.9000
4
+ Summary: Python port of the R scales package (tracks R scales 1.4.0.9000)
5
+ Project-URL: Homepage, https://github.com/Bio-Babel/scales_py
6
+ Project-URL: Repository, https://github.com/Bio-Babel/scales_py
7
+ Project-URL: Issues, https://github.com/Bio-Babel/scales_py/issues
8
+ Project-URL: Documentation, https://github.com/Bio-Babel/scales_py#readme
9
+ Author-email: Jeffery Liu <jeffliu.lucky@gmail.com>
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: R-port,breaks,colour-palettes,ggplot2,scales,transforms,visualization
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: MacOS
18
+ Classifier: Operating System :: Microsoft :: Windows
19
+ Classifier: Operating System :: POSIX :: Linux
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Topic :: Scientific/Engineering :: Visualization
25
+ Classifier: Typing :: Typed
26
+ Requires-Python: >=3.10
27
+ Requires-Dist: numpy>=1.24
28
+ Provides-Extra: dev
29
+ Requires-Dist: build; extra == 'dev'
30
+ Requires-Dist: pytest; extra == 'dev'
31
+ Requires-Dist: pytest-cov; extra == 'dev'
32
+ Requires-Dist: ruff; extra == 'dev'
33
+ Requires-Dist: twine; extra == 'dev'
34
+ Provides-Extra: docs
35
+ Requires-Dist: mkdocs; extra == 'docs'
36
+ Requires-Dist: mkdocs-jupyter; extra == 'docs'
37
+ Requires-Dist: mkdocs-material; extra == 'docs'
38
+ Requires-Dist: mkdocstrings[python]; extra == 'docs'
39
+ Description-Content-Type: text/markdown
40
+
41
+ # scales_py
42
+
43
+ Python port of the R **scales** package (tracks R scales 1.4.0.9000).
44
+
45
+ The Python import name is `scales`; the PyPI distribution name is `scales-python`
46
+ (the name `scales` is already taken on PyPI).
47
+
48
+ ## Installation
49
+
50
+ ```bash
51
+ pip install scales-python
52
+ ```
53
+
54
+ Or, for a local development checkout:
55
+
56
+ ```bash
57
+ git clone https://github.com/Bio-Babel/scales_py.git
58
+ cd scales_py
59
+ pip install -e ".[dev]"
60
+ ```
61
+
62
+ ## Quick Start
63
+
64
+ ```python
65
+ import scales
66
+ ```
67
+
68
+ ## Documentation
69
+
70
+ ```bash
71
+ pip install -e ".[docs]"
72
+ mkdocs serve
73
+ ```
@@ -0,0 +1,33 @@
1
+ # scales_py
2
+
3
+ Python port of the R **scales** package (tracks R scales 1.4.0.9000).
4
+
5
+ The Python import name is `scales`; the PyPI distribution name is `scales-python`
6
+ (the name `scales` is already taken on PyPI).
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ pip install scales-python
12
+ ```
13
+
14
+ Or, for a local development checkout:
15
+
16
+ ```bash
17
+ git clone https://github.com/Bio-Babel/scales_py.git
18
+ cd scales_py
19
+ pip install -e ".[dev]"
20
+ ```
21
+
22
+ ## Quick Start
23
+
24
+ ```python
25
+ import scales
26
+ ```
27
+
28
+ ## Documentation
29
+
30
+ ```bash
31
+ pip install -e ".[docs]"
32
+ mkdocs serve
33
+ ```
@@ -0,0 +1,76 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "scales-python"
7
+ version = "1.4.0.9000"
8
+ description = "Python port of the R scales package (tracks R scales 1.4.0.9000)"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [
14
+ { name = "Jeffery Liu", email = "jeffliu.lucky@gmail.com" },
15
+ ]
16
+ keywords = [
17
+ "scales",
18
+ "ggplot2",
19
+ "R-port",
20
+ "visualization",
21
+ "colour-palettes",
22
+ "breaks",
23
+ "transforms",
24
+ ]
25
+ classifiers = [
26
+ "Development Status :: 4 - Beta",
27
+ "Intended Audience :: Science/Research",
28
+ "Intended Audience :: Developers",
29
+ "License :: OSI Approved :: MIT License",
30
+ "Operating System :: POSIX :: Linux",
31
+ "Operating System :: MacOS",
32
+ "Operating System :: Microsoft :: Windows",
33
+ "Programming Language :: Python :: 3",
34
+ "Programming Language :: Python :: 3.10",
35
+ "Programming Language :: Python :: 3.11",
36
+ "Programming Language :: Python :: 3.12",
37
+ "Topic :: Scientific/Engineering :: Visualization",
38
+ "Typing :: Typed",
39
+ ]
40
+ dependencies = [
41
+ "numpy>=1.24",
42
+ ]
43
+
44
+ [project.optional-dependencies]
45
+ dev = ["pytest", "pytest-cov", "ruff", "build", "twine"]
46
+ docs = [
47
+ "mkdocs",
48
+ "mkdocstrings[python]",
49
+ "mkdocs-material",
50
+ "mkdocs-jupyter",
51
+ ]
52
+
53
+ [project.urls]
54
+ Homepage = "https://github.com/Bio-Babel/scales_py"
55
+ Repository = "https://github.com/Bio-Babel/scales_py"
56
+ Issues = "https://github.com/Bio-Babel/scales_py/issues"
57
+ Documentation = "https://github.com/Bio-Babel/scales_py#readme"
58
+
59
+ [tool.hatch.build.targets.wheel]
60
+ packages = ["scales"]
61
+
62
+ [tool.hatch.build.targets.sdist]
63
+ exclude = [
64
+ "tutorials/",
65
+ "docs/",
66
+ "tests/",
67
+ "site/",
68
+ "mkdocs.yml",
69
+ ".github/",
70
+ "*.egg-info/",
71
+ "build/",
72
+ "dist/",
73
+ ]
74
+
75
+ [tool.pytest.ini_options]
76
+ testpaths = ["tests"]
@@ -0,0 +1,295 @@
1
+ """Python port of the R scales package — scale functions for visualization."""
2
+
3
+ __version__ = "1.4.0.9000"
4
+ __r_commit__ = "04fc333"
5
+
6
+ # -- Utilities ---------------------------------------------------------------
7
+ from ._utils import * # noqa: F401,F403
8
+
9
+ # -- Bounds / out-of-bounds --------------------------------------------------
10
+ from .bounds import * # noqa: F401,F403
11
+
12
+ # -- Transforms --------------------------------------------------------------
13
+ from .transforms import * # noqa: F401,F403
14
+
15
+ # -- Breaks ------------------------------------------------------------------
16
+ from .breaks import * # noqa: F401,F403
17
+ from .breaks_log import * # noqa: F401,F403
18
+ from .minor_breaks import * # noqa: F401,F403
19
+
20
+ # -- Palettes ----------------------------------------------------------------
21
+ from .palettes import * # noqa: F401,F403
22
+
23
+ # -- Colour utilities --------------------------------------------------------
24
+ from .colour_ramp import * # noqa: F401,F403
25
+ from .colour_manip import * # noqa: F401,F403
26
+ from .colour_mapping import * # noqa: F401,F403
27
+
28
+ # -- Labels ------------------------------------------------------------------
29
+ from .labels import * # noqa: F401,F403
30
+
31
+ # -- Range -------------------------------------------------------------------
32
+ from .range import * # noqa: F401,F403
33
+
34
+ # -- Scale helpers -----------------------------------------------------------
35
+ from .scale_continuous import * # noqa: F401,F403
36
+ from .scale_discrete import * # noqa: F401,F403
37
+
38
+ # ---------------------------------------------------------------------------
39
+ # Comprehensive public API
40
+ # ---------------------------------------------------------------------------
41
+ __all__ = [
42
+ # _utils
43
+ "zero_range",
44
+ "expand_range",
45
+ "rescale_common",
46
+ "recycle_common",
47
+ "fullseq",
48
+ "round_any",
49
+ "offset_by",
50
+ "precision",
51
+ "demo_continuous",
52
+ "demo_log10",
53
+ "demo_discrete",
54
+ "demo_datetime",
55
+ "demo_time",
56
+ "demo_timespan",
57
+ # bounds
58
+ "rescale",
59
+ "rescale_mid",
60
+ "rescale_max",
61
+ "rescale_none",
62
+ "censor",
63
+ "squish",
64
+ "squish_infinite",
65
+ "discard",
66
+ "oob_censor",
67
+ "oob_censor_any",
68
+ "oob_squish",
69
+ "oob_squish_any",
70
+ "oob_squish_infinite",
71
+ "oob_keep",
72
+ "oob_discard",
73
+ "trim_to_domain",
74
+ "trans_range", # R alias: trans_range <- trim_to_domain
75
+ # transforms – core API
76
+ "Transform",
77
+ "new_transform",
78
+ "is_transform",
79
+ "as_transform",
80
+ "trans_breaks",
81
+ "trans_format",
82
+ # transforms – constructors
83
+ "transform_identity",
84
+ "transform_log",
85
+ "transform_log10",
86
+ "transform_log2",
87
+ "transform_log1p",
88
+ "transform_exp",
89
+ "transform_sqrt",
90
+ "transform_reverse",
91
+ "transform_reciprocal",
92
+ "transform_asinh",
93
+ "transform_asn",
94
+ "transform_atanh",
95
+ "transform_boxcox",
96
+ "transform_modulus",
97
+ "transform_yj",
98
+ "transform_pseudo_log",
99
+ "transform_logit",
100
+ "transform_probit",
101
+ "transform_probability",
102
+ "transform_date",
103
+ "transform_time",
104
+ "transform_timespan",
105
+ "transform_compose",
106
+ # transforms – legacy aliases
107
+ "trans_new",
108
+ "identity_trans",
109
+ "log_trans",
110
+ "log10_trans",
111
+ "log2_trans",
112
+ "log1p_trans",
113
+ "exp_trans",
114
+ "sqrt_trans",
115
+ "reverse_trans",
116
+ "reciprocal_trans",
117
+ "asinh_trans",
118
+ "asn_trans",
119
+ "atanh_trans",
120
+ "boxcox_trans",
121
+ "modulus_trans",
122
+ "yj_trans",
123
+ "pseudo_log_trans",
124
+ "logit_trans",
125
+ "probit_trans",
126
+ "probability_trans",
127
+ "date_trans",
128
+ "time_trans",
129
+ "timespan_trans",
130
+ "transform_hms",
131
+ "hms_trans",
132
+ "compose_trans",
133
+ "is_trans",
134
+ "as_trans",
135
+ # breaks
136
+ "breaks_extended",
137
+ "breaks_pretty",
138
+ "breaks_width",
139
+ "breaks_timespan",
140
+ "breaks_exp",
141
+ "cbreaks",
142
+ "extended_breaks",
143
+ "pretty_breaks",
144
+ # breaks_log
145
+ "breaks_log",
146
+ "log_breaks", # R alias: log_breaks <- breaks_log
147
+ "minor_breaks_log",
148
+ # minor_breaks
149
+ "minor_breaks_n",
150
+ "minor_breaks_width",
151
+ "regular_minor_breaks",
152
+ # palettes – core classes
153
+ "ContinuousPalette",
154
+ "DiscretePalette",
155
+ # palettes – constructors
156
+ "new_continuous_palette",
157
+ "new_discrete_palette",
158
+ # palettes – testing / getters
159
+ "is_pal",
160
+ "is_continuous_pal",
161
+ "is_discrete_pal",
162
+ "is_colour_pal",
163
+ "is_numeric_pal",
164
+ "palette_nlevels",
165
+ "palette_na_safe",
166
+ "palette_type",
167
+ # palettes – coercion
168
+ "as_discrete_pal",
169
+ "as_continuous_pal",
170
+ "register_palette",
171
+ "get_palette",
172
+ "palette_names",
173
+ "reset_palettes",
174
+ # palettes – discrete factories
175
+ "pal_brewer",
176
+ "pal_hue",
177
+ "pal_viridis",
178
+ "pal_grey",
179
+ "pal_shape",
180
+ "pal_linetype",
181
+ "pal_identity",
182
+ "pal_manual",
183
+ "pal_dichromat",
184
+ # palettes – continuous factories
185
+ "pal_gradient_n",
186
+ "pal_div_gradient",
187
+ "pal_seq_gradient",
188
+ "pal_area",
189
+ "pal_rescale",
190
+ "abs_area",
191
+ # palettes – legacy aliases
192
+ "brewer_pal",
193
+ "hue_pal",
194
+ "viridis_pal",
195
+ "grey_pal",
196
+ "shape_pal",
197
+ "linetype_pal",
198
+ "identity_pal",
199
+ "manual_pal",
200
+ "dichromat_pal",
201
+ "gradient_n_pal",
202
+ "div_gradient_pal",
203
+ "seq_gradient_pal",
204
+ "area_pal",
205
+ "rescale_pal",
206
+ # colour_ramp
207
+ "colour_ramp",
208
+ # colour_manip
209
+ "alpha",
210
+ "muted",
211
+ "col2hcl",
212
+ "show_col",
213
+ "col_mix",
214
+ "col_shift",
215
+ "col_lighter",
216
+ "col_darker",
217
+ "col_saturate",
218
+ # colour_mapping
219
+ "col_numeric",
220
+ "col_bin",
221
+ "col_quantile",
222
+ "col_factor",
223
+ # labels – closure factories
224
+ "label_number",
225
+ "label_comma",
226
+ "label_percent",
227
+ "label_dollar",
228
+ "label_currency",
229
+ "label_scientific",
230
+ "label_bytes",
231
+ "label_ordinal",
232
+ "label_pvalue",
233
+ "label_date",
234
+ "label_date_short",
235
+ "label_time",
236
+ "label_timespan",
237
+ "label_wrap",
238
+ "label_glue",
239
+ "label_parse",
240
+ "label_math",
241
+ "label_log",
242
+ "label_number_auto",
243
+ "label_number_si",
244
+ "label_dictionary",
245
+ "compose_label",
246
+ # labels – ordinal helpers
247
+ "ordinal_english",
248
+ "ordinal_french",
249
+ "ordinal_spanish",
250
+ # labels – direct formatting functions
251
+ "number",
252
+ "comma",
253
+ "dollar",
254
+ "percent",
255
+ "scientific",
256
+ "ordinal",
257
+ "pvalue",
258
+ # labels – core log formatting
259
+ "format_log",
260
+ # labels – scale cut helpers
261
+ "cut_short_scale",
262
+ "cut_long_scale",
263
+ "cut_time_scale",
264
+ "cut_si",
265
+ # labels – date utilities
266
+ "date_breaks",
267
+ "date_format",
268
+ "time_format",
269
+ # labels – legacy aliases
270
+ "comma_format",
271
+ "dollar_format",
272
+ "percent_format",
273
+ "scientific_format",
274
+ "ordinal_format",
275
+ "pvalue_format",
276
+ "number_format",
277
+ "number_bytes_format",
278
+ "number_bytes",
279
+ "parse_format",
280
+ "math_format",
281
+ "wrap_format",
282
+ "unit_format",
283
+ "format_format",
284
+ "number_options",
285
+ # range
286
+ "Range",
287
+ "ContinuousRange",
288
+ "DiscreteRange",
289
+ # scale_continuous
290
+ "cscale",
291
+ "train_continuous",
292
+ # scale_discrete
293
+ "dscale",
294
+ "train_discrete",
295
+ ]