absfuyu 4.2.0__tar.gz → 5.0.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.
Potentially problematic release.
This version of absfuyu might be problematic. Click here for more details.
- {absfuyu-4.2.0 → absfuyu-5.0.0}/PKG-INFO +41 -14
- absfuyu-5.0.0/README.md +92 -0
- absfuyu-5.0.0/docs/_template/versioning.html +27 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/docs/conf.py +12 -4
- absfuyu-4.2.0/README.md → absfuyu-5.0.0/docs/info.md +33 -13
- absfuyu-5.0.0/images/Logo Full.png +0 -0
- absfuyu-5.0.0/images/Logo Square.png +0 -0
- absfuyu-5.0.0/images/Logo White.png +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/pyproject.toml +46 -16
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/__init__.py +4 -4
- absfuyu-5.0.0/src/absfuyu/__main__.py +27 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/cli/color.py +7 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/cli/do_group.py +0 -35
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/cli/tool_group.py +5 -5
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/config/__init__.py +17 -34
- absfuyu-5.0.0/src/absfuyu/core/__init__.py +49 -0
- absfuyu-5.0.0/src/absfuyu/core/baseclass.py +299 -0
- absfuyu-5.0.0/src/absfuyu/core/baseclass2.py +165 -0
- absfuyu-5.0.0/src/absfuyu/core/decorator.py +67 -0
- absfuyu-5.0.0/src/absfuyu/core/docstring.py +163 -0
- absfuyu-5.0.0/src/absfuyu/core/dummy_cli.py +67 -0
- absfuyu-5.0.0/src/absfuyu/core/dummy_func.py +47 -0
- absfuyu-5.0.0/src/absfuyu/dxt/__init__.py +42 -0
- absfuyu-5.0.0/src/absfuyu/dxt/dictext.py +201 -0
- absfuyu-5.0.0/src/absfuyu/dxt/dxt_support.py +79 -0
- absfuyu-5.0.0/src/absfuyu/dxt/intext.py +586 -0
- absfuyu-5.0.0/src/absfuyu/dxt/listext.py +508 -0
- absfuyu-5.0.0/src/absfuyu/dxt/strext.py +530 -0
- {absfuyu-4.2.0/src/absfuyu/extensions → absfuyu-5.0.0/src/absfuyu/extra}/__init__.py +2 -2
- absfuyu-5.0.0/src/absfuyu/extra/beautiful.py +251 -0
- {absfuyu-4.2.0/src/absfuyu/extensions → absfuyu-5.0.0/src/absfuyu/extra}/data_analysis.py +51 -82
- absfuyu-5.0.0/src/absfuyu/fun/__init__.py +193 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/fun/tarot.py +9 -17
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/game/__init__.py +6 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/game/game_stat.py +6 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/game/sudoku.py +7 -1
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/game/tictactoe.py +12 -5
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/game/wordle.py +14 -8
- absfuyu-5.0.0/src/absfuyu/general/__init__.py +23 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/general/content.py +22 -36
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/general/generator.py +17 -42
- absfuyu-5.0.0/src/absfuyu/general/human.py +309 -0
- absfuyu-5.0.0/src/absfuyu/general/shape.py +1334 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/logger.py +8 -13
- absfuyu-5.0.0/src/absfuyu/pkg_data/__init__.py +187 -0
- absfuyu-4.2.0/src/absfuyu/pkg_data/__init__.py → absfuyu-5.0.0/src/absfuyu/pkg_data/deprecated.py +23 -40
- absfuyu-5.0.0/src/absfuyu/sort.py +140 -0
- absfuyu-5.0.0/src/absfuyu/tools/__init__.py +8 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/tools/checksum.py +33 -22
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/tools/converter.py +51 -48
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/tools/keygen.py +25 -30
- absfuyu-5.0.0/src/absfuyu/tools/obfuscator.py +382 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/tools/passwordlib.py +99 -29
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/tools/shutdownizer.py +68 -47
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/tools/web.py +2 -9
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/util/__init__.py +15 -15
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/util/api.py +10 -15
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/util/json_method.py +7 -24
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/util/lunar.py +3 -9
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/util/path.py +22 -27
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/util/performance.py +43 -67
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/util/shorten_number.py +65 -14
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/util/zipped.py +9 -15
- absfuyu-5.0.0/tests/test_beautiful.py +56 -0
- absfuyu-5.0.0/tests/test_core.py +215 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/tests/test_data_analysis.py +1 -1
- {absfuyu-4.2.0 → absfuyu-5.0.0}/tests/test_data_extension.py +80 -42
- {absfuyu-4.2.0 → absfuyu-5.0.0}/tests/test_everything.py +68 -33
- {absfuyu-4.2.0 → absfuyu-5.0.0}/tests/test_extensions.py +2 -2
- absfuyu-5.0.0/tests/test_fun.py +65 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/tests/test_logger.py +2 -2
- absfuyu-5.0.0/tests/test_passwordlib.py +120 -0
- absfuyu-5.0.0/tests/test_pkg_data.py +36 -0
- absfuyu-5.0.0/tests/test_shape.py +1037 -0
- absfuyu-5.0.0/tests/test_tools.py +154 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/tests/test_util.py +63 -4
- absfuyu-4.2.0/docs/info.md +0 -39
- absfuyu-4.2.0/src/absfuyu/__main__.py +0 -15
- absfuyu-4.2.0/src/absfuyu/core.py +0 -57
- absfuyu-4.2.0/src/absfuyu/everything.py +0 -32
- absfuyu-4.2.0/src/absfuyu/extensions/beautiful.py +0 -188
- absfuyu-4.2.0/src/absfuyu/fun/WGS.py +0 -134
- absfuyu-4.2.0/src/absfuyu/fun/__init__.py +0 -218
- absfuyu-4.2.0/src/absfuyu/general/__init__.py +0 -96
- absfuyu-4.2.0/src/absfuyu/general/data_extension.py +0 -1796
- absfuyu-4.2.0/src/absfuyu/general/human.py +0 -429
- absfuyu-4.2.0/src/absfuyu/sort.py +0 -264
- absfuyu-4.2.0/src/absfuyu/tools/__init__.py +0 -8
- absfuyu-4.2.0/src/absfuyu/tools/obfuscator.py +0 -248
- absfuyu-4.2.0/src/absfuyu/tools/stats.py +0 -226
- absfuyu-4.2.0/src/absfuyu/util/pkl.py +0 -67
- absfuyu-4.2.0/tests/test_beautiful.py +0 -13
- absfuyu-4.2.0/tests/test_fun.py +0 -30
- absfuyu-4.2.0/tests/test_passwordlib.py +0 -51
- absfuyu-4.2.0/tests/test_pkg_data.py +0 -18
- absfuyu-4.2.0/tests/test_tarot.py +0 -18
- absfuyu-4.2.0/tests/test_tools.py +0 -70
- {absfuyu-4.2.0 → absfuyu-5.0.0}/.gitignore +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/LICENSE +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/dev_requirements.txt +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/docs/Makefile +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/docs/index.rst +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/docs/make.bat +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/docs/modules.rst +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/images/repository-image-crop.png +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/images/repository-image-white.png +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/images/repository-image.png +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/cli/__init__.py +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/cli/config_group.py +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/cli/game_group.py +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/config/config.json +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/pkg_data/chemistry.pkl +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/pkg_data/passwordlib_lzma.pkl +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/pkg_data/tarot.pkl +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/py.typed +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/src/absfuyu/version.py +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/tests/__init__.py +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/tests/conftest.py +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/tests/test_config.py +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/tests/test_game.py +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/tests/test_generator.py +0 -0
- {absfuyu-4.2.0 → absfuyu-5.0.0}/tests/test_version.py +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: absfuyu
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.0.0
|
|
4
4
|
Summary: A small collection of code
|
|
5
5
|
Project-URL: Homepage, https://github.com/AbsoluteWinter/absfuyu-public
|
|
6
6
|
Project-URL: Documentation, https://absolutewinter.github.io/absfuyu-docs/
|
|
7
7
|
Project-URL: Repository, https://github.com/AbsoluteWinter/absfuyu-public
|
|
8
8
|
Project-URL: Issues, https://github.com/AbsoluteWinter/absfuyu-public/issues
|
|
9
9
|
Author: somewhatcold (AbsoluteWinter)
|
|
10
|
-
License: MIT
|
|
10
|
+
License-Expression: MIT
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Keywords: utilities
|
|
13
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
@@ -28,16 +28,16 @@ Requires-Python: <4,>=3.11
|
|
|
28
28
|
Requires-Dist: bs4
|
|
29
29
|
Requires-Dist: click>=8.0.0
|
|
30
30
|
Requires-Dist: colorama
|
|
31
|
-
Requires-Dist: deprecated
|
|
32
|
-
Requires-Dist: python-dateutil
|
|
33
31
|
Requires-Dist: requests
|
|
34
|
-
Requires-Dist: typing-extensions>=4.5.0; python_version < '3.12'
|
|
35
|
-
Requires-Dist: unidecode
|
|
36
32
|
Provides-Extra: beautiful
|
|
37
33
|
Requires-Dist: rich; extra == 'beautiful'
|
|
38
34
|
Provides-Extra: dev
|
|
39
35
|
Requires-Dist: hatch; extra == 'dev'
|
|
40
36
|
Requires-Dist: pytest; extra == 'dev'
|
|
37
|
+
Provides-Extra: docs
|
|
38
|
+
Requires-Dist: numpy; extra == 'docs'
|
|
39
|
+
Requires-Dist: pandas; extra == 'docs'
|
|
40
|
+
Requires-Dist: rich; extra == 'docs'
|
|
41
41
|
Provides-Extra: extra
|
|
42
42
|
Requires-Dist: numpy; extra == 'extra'
|
|
43
43
|
Requires-Dist: pandas; extra == 'extra'
|
|
@@ -46,6 +46,7 @@ Requires-Dist: numpy; extra == 'full'
|
|
|
46
46
|
Requires-Dist: pandas; extra == 'full'
|
|
47
47
|
Requires-Dist: rich; extra == 'full'
|
|
48
48
|
Requires-Dist: tqdm; extra == 'full'
|
|
49
|
+
Requires-Dist: unidecode; extra == 'full'
|
|
49
50
|
Description-Content-Type: text/markdown
|
|
50
51
|
|
|
51
52
|
<div align="center">
|
|
@@ -66,10 +67,12 @@ Description-Content-Type: text/markdown
|
|
|
66
67
|
|
|
67
68
|
## **SUMMARY:**
|
|
68
69
|
|
|
69
|
-
|
|
70
|
+
This project is a collection of code primarily developed as a personal hobby. It aims to provide practical experience and enhance my coding skills while exploring potential future applications.
|
|
70
71
|
|
|
71
72
|
## **INSTALLATION:**
|
|
72
73
|
|
|
74
|
+
To install the package, run the following command:
|
|
75
|
+
|
|
73
76
|
```bash
|
|
74
77
|
pip install -U absfuyu
|
|
75
78
|
```
|
|
@@ -81,31 +84,55 @@ import absfuyu
|
|
|
81
84
|
help(absfuyu)
|
|
82
85
|
```
|
|
83
86
|
|
|
87
|
+
### Notable features
|
|
88
|
+
|
|
89
|
+
**absfuyu.core**: Provides foundational components for additional functionalities.
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
# Decorators that adds info to __doc__
|
|
93
|
+
from absfuyu.core.docstring import versionadded, versionchanged, deprecated
|
|
94
|
+
|
|
95
|
+
# Class mixins for enhanced functionality
|
|
96
|
+
from absfuyu.core.baseclass import AutoREPRMixin, ShowAllMethodsMixin
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**absfuyu.dxt**: Extension for `list`, `str`, `dict`, `int`.
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
from absfuyu.dxt import DictExt, IntExt, ListExt, Text
|
|
103
|
+
for x in [DictExt, IntExt, ListExt, Text]:
|
|
104
|
+
x.show_all_methods(print_result=1)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
There are many additional features available to explore.
|
|
108
|
+
|
|
84
109
|
## **DOCUMENTATION:**
|
|
85
110
|
|
|
86
|
-
|
|
111
|
+
For more detailed information about the project, please refer to the documentation available at the following link:
|
|
112
|
+
|
|
113
|
+
> [Project Documentation](https://absolutewinter.github.io/absfuyu/)
|
|
87
114
|
|
|
88
|
-
## **
|
|
115
|
+
## **DEVELOPMENT SETUP**
|
|
89
116
|
|
|
90
|
-
1. Create
|
|
117
|
+
1. Create a Virtual Environment
|
|
91
118
|
|
|
92
119
|
```bash
|
|
93
120
|
python -m venv env
|
|
94
121
|
```
|
|
95
122
|
|
|
96
|
-
Note:
|
|
123
|
+
Note: You may need to execute this command in PowerShell on Windows:
|
|
97
124
|
|
|
98
125
|
```powershell
|
|
99
126
|
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
|
|
100
127
|
```
|
|
101
128
|
|
|
102
|
-
2. Install
|
|
129
|
+
2. Install Required Packages
|
|
103
130
|
|
|
104
131
|
```bash
|
|
105
132
|
python -m pip install -e .[full,dev]
|
|
106
133
|
```
|
|
107
134
|
|
|
108
|
-
3.
|
|
135
|
+
3. Acquire Information About the Development Environment Configuration
|
|
109
136
|
|
|
110
137
|
```bash
|
|
111
138
|
hatch env show
|
|
@@ -113,4 +140,4 @@ hatch env show
|
|
|
113
140
|
|
|
114
141
|
## **LICENSE:**
|
|
115
142
|
|
|
116
|
-
MIT License
|
|
143
|
+
This project is licensed under the MIT License.
|
absfuyu-5.0.0/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1 align="center">
|
|
3
|
+
<img src="https://github.com/AbsoluteWinter/AbsoluteWinter.github.io/blob/main/absfuyu/images/repository-image-crop.png?raw=true" alt="absfuyu"/>
|
|
4
|
+
</h1>
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://pypi.org/project/absfuyu/"><img src="https://img.shields.io/pypi/pyversions/absfuyu?style=flat-square&logo=python" alt="PyPI Supported Versions"/></a>
|
|
7
|
+
<a href="https://pypi.org/project/absfuyu/"><img src="https://img.shields.io/pypi/dm/absfuyu?style=flat-square&color=blue" alt="PyPI Downloads"/></a>
|
|
8
|
+
<a href="https://pypi.org/project/absfuyu/"><img src="https://img.shields.io/pypi/v/absfuyu?style=flat-square&logo=pypi" /></a>
|
|
9
|
+
<a><img src="https://img.shields.io/pypi/l/absfuyu?style=flat-square&logo=github&color=blue"/></a>
|
|
10
|
+
<a><img src="https://img.shields.io/badge/code%20style-black-black?style=flat-square"/></a>
|
|
11
|
+
<a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&style=flat-square" alt="Ruff" style="max-width:100%;"></a>
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## **SUMMARY:**
|
|
18
|
+
|
|
19
|
+
This project is a collection of code primarily developed as a personal hobby. It aims to provide practical experience and enhance my coding skills while exploring potential future applications.
|
|
20
|
+
|
|
21
|
+
## **INSTALLATION:**
|
|
22
|
+
|
|
23
|
+
To install the package, run the following command:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install -U absfuyu
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## **USAGE:**
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
import absfuyu
|
|
33
|
+
help(absfuyu)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Notable features
|
|
37
|
+
|
|
38
|
+
**absfuyu.core**: Provides foundational components for additional functionalities.
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
# Decorators that adds info to __doc__
|
|
42
|
+
from absfuyu.core.docstring import versionadded, versionchanged, deprecated
|
|
43
|
+
|
|
44
|
+
# Class mixins for enhanced functionality
|
|
45
|
+
from absfuyu.core.baseclass import AutoREPRMixin, ShowAllMethodsMixin
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**absfuyu.dxt**: Extension for `list`, `str`, `dict`, `int`.
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from absfuyu.dxt import DictExt, IntExt, ListExt, Text
|
|
52
|
+
for x in [DictExt, IntExt, ListExt, Text]:
|
|
53
|
+
x.show_all_methods(print_result=1)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
There are many additional features available to explore.
|
|
57
|
+
|
|
58
|
+
## **DOCUMENTATION:**
|
|
59
|
+
|
|
60
|
+
For more detailed information about the project, please refer to the documentation available at the following link:
|
|
61
|
+
|
|
62
|
+
> [Project Documentation](https://absolutewinter.github.io/absfuyu/)
|
|
63
|
+
|
|
64
|
+
## **DEVELOPMENT SETUP**
|
|
65
|
+
|
|
66
|
+
1. Create a Virtual Environment
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
python -m venv env
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Note: You may need to execute this command in PowerShell on Windows:
|
|
73
|
+
|
|
74
|
+
```powershell
|
|
75
|
+
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
2. Install Required Packages
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
python -m pip install -e .[full,dev]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
3. Acquire Information About the Development Environment Configuration
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
hatch env show
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## **LICENSE:**
|
|
91
|
+
|
|
92
|
+
This project is licensed under the MIT License.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{%- if current_version %}
|
|
2
|
+
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
|
|
3
|
+
<span class="rst-current-version" data-toggle="rst-current-version">
|
|
4
|
+
<span class="fa fa-book"> Other Versions</span>
|
|
5
|
+
v: {{ current_version.name }}
|
|
6
|
+
<span class="fa fa-caret-down"></span>
|
|
7
|
+
</span>
|
|
8
|
+
<div class="rst-other-versions">
|
|
9
|
+
{%- if versions.tags %}
|
|
10
|
+
<dl>
|
|
11
|
+
<dt>Tags</dt>
|
|
12
|
+
{%- for item in versions.tags %}
|
|
13
|
+
<dd><a href="{{ item.url }}">{{ item.name }}</a></dd>
|
|
14
|
+
{%- endfor %}
|
|
15
|
+
</dl>
|
|
16
|
+
{%- endif %}
|
|
17
|
+
{%- if versions.branches %}
|
|
18
|
+
<dl>
|
|
19
|
+
<dt>Branches</dt>
|
|
20
|
+
{%- for item in versions.branches %}
|
|
21
|
+
<dd><a href="{{ item.url }}">{{ item.name }}</a></dd>
|
|
22
|
+
{%- endfor %}
|
|
23
|
+
</dl>
|
|
24
|
+
{%- endif %}
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
{%- endif %}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
import os
|
|
7
7
|
import sys
|
|
8
|
-
from datetime import datetime
|
|
9
8
|
|
|
10
9
|
sys.path.insert(0, os.path.abspath(".."))
|
|
11
10
|
|
|
@@ -14,8 +13,8 @@ from absfuyu import __author__, __title__, __version__
|
|
|
14
13
|
# -- Project information -----------------------------------------------------
|
|
15
14
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
16
15
|
|
|
17
|
-
project = __title__
|
|
18
|
-
copyright = f"2022
|
|
16
|
+
project = f"{__title__}"
|
|
17
|
+
copyright = f"2022-%Y, {__author__}"
|
|
19
18
|
author = __author__
|
|
20
19
|
version = __version__
|
|
21
20
|
release = version
|
|
@@ -23,6 +22,8 @@ release = version
|
|
|
23
22
|
# -- General configuration ---------------------------------------------------
|
|
24
23
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
25
24
|
|
|
25
|
+
needs_sphinx = "8.1"
|
|
26
|
+
|
|
26
27
|
extensions = [
|
|
27
28
|
"sphinx.ext.autodoc", # include documentation
|
|
28
29
|
"sphinx.ext.autosummary",
|
|
@@ -58,7 +59,9 @@ source_suffix = {
|
|
|
58
59
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
59
60
|
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
html_title = f"{__title__.upper()}'S DOCUMENTATION v{__version__}"
|
|
63
|
+
html_short_title = f"{__title__} v{__version__}"
|
|
64
|
+
# html_logo = "https://github.com/AbsoluteWinter/AbsoluteWinter.github.io/blob/75568549d30f447a66baac8ecc3b5e6b49a67d18/absfuyu/images/LOGO.png?raw=true"
|
|
62
65
|
|
|
63
66
|
html_theme = "sphinx_rtd_theme"
|
|
64
67
|
html_static_path = ["_static"]
|
|
@@ -69,6 +72,11 @@ html_show_sourcelink = False
|
|
|
69
72
|
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
|
70
73
|
html_show_sphinx = False
|
|
71
74
|
|
|
75
|
+
html_sidebars = {
|
|
76
|
+
"**": [
|
|
77
|
+
"versioning.html",
|
|
78
|
+
],
|
|
79
|
+
}
|
|
72
80
|
|
|
73
81
|
# -- Extension configuration -------------------------------------------------
|
|
74
82
|
|
|
@@ -14,53 +14,73 @@
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
# SUMMARY
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
This project is a collection of code primarily developed as a personal hobby. It aims to provide practical experience and enhance my coding skills while exploring potential future applications.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
# INSTALLATION
|
|
22
|
+
|
|
23
|
+
To install the package, run the following command:
|
|
22
24
|
|
|
23
25
|
```bash
|
|
24
26
|
pip install -U absfuyu
|
|
25
27
|
```
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
# USAGE
|
|
28
30
|
|
|
29
31
|
```python
|
|
30
32
|
import absfuyu
|
|
31
33
|
help(absfuyu)
|
|
32
34
|
```
|
|
33
35
|
|
|
34
|
-
##
|
|
36
|
+
## Notable features
|
|
37
|
+
|
|
38
|
+
**absfuyu.core**: Provides foundational components for additional functionalities.
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
# Decorators that adds info to __doc__
|
|
42
|
+
from absfuyu.core.docstring import versionadded, versionchanged, deprecated
|
|
43
|
+
|
|
44
|
+
# Class mixins for enhanced functionality
|
|
45
|
+
from absfuyu.core.baseclass import AutoREPRMixin, ShowAllMethodsMixin
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**absfuyu.dxt**: Extension for `list`, `str`, `dict`, `int`.
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from absfuyu.dxt import DictExt, IntExt, ListExt, Text
|
|
52
|
+
for x in [DictExt, IntExt, ListExt, Text]:
|
|
53
|
+
x.show_all_methods(print_result=1)
|
|
54
|
+
```
|
|
35
55
|
|
|
36
|
-
|
|
56
|
+
There are many additional features available to explore.
|
|
37
57
|
|
|
38
|
-
|
|
58
|
+
# DEVELOPMENT SETUP
|
|
39
59
|
|
|
40
|
-
1. Create
|
|
60
|
+
1. Create a Virtual Environment
|
|
41
61
|
|
|
42
62
|
```bash
|
|
43
63
|
python -m venv env
|
|
44
64
|
```
|
|
45
65
|
|
|
46
|
-
Note:
|
|
66
|
+
Note: You may need to execute this command in PowerShell on Windows:
|
|
47
67
|
|
|
48
68
|
```powershell
|
|
49
69
|
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
|
|
50
70
|
```
|
|
51
71
|
|
|
52
|
-
2. Install
|
|
72
|
+
2. Install Required Packages
|
|
53
73
|
|
|
54
74
|
```bash
|
|
55
75
|
python -m pip install -e .[full,dev]
|
|
56
76
|
```
|
|
57
77
|
|
|
58
|
-
3.
|
|
78
|
+
3. Acquire Information About the Development Environment Configuration
|
|
59
79
|
|
|
60
80
|
```bash
|
|
61
81
|
hatch env show
|
|
62
82
|
```
|
|
63
83
|
|
|
64
|
-
|
|
84
|
+
# LICENSE
|
|
65
85
|
|
|
66
|
-
MIT License
|
|
86
|
+
This project is licensed under the MIT License.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
# MARK: BUILD ====================
|
|
12
12
|
[build-system]
|
|
13
|
-
requires = ["hatchling>=1.
|
|
13
|
+
requires = ["hatchling>=1.27.0", "hatch-vcs>=0.3.0"]
|
|
14
14
|
build-backend = "hatchling.build"
|
|
15
15
|
|
|
16
16
|
# MARK: PROJECT ====================
|
|
@@ -19,7 +19,8 @@ name = "absfuyu"
|
|
|
19
19
|
description = "A small collection of code"
|
|
20
20
|
readme = { "file" = "README.md", "content-type" = "text/markdown" }
|
|
21
21
|
requires-python = ">=3.11, <4"
|
|
22
|
-
license =
|
|
22
|
+
license = "MIT"
|
|
23
|
+
license-files = ["LICEN[CS]E*"]
|
|
23
24
|
keywords = ["utilities"]
|
|
24
25
|
authors = [{ name = "somewhatcold (AbsoluteWinter)" }]
|
|
25
26
|
classifiers = [
|
|
@@ -43,11 +44,8 @@ dependencies = [
|
|
|
43
44
|
"bs4",
|
|
44
45
|
"click>=8.0.0",
|
|
45
46
|
"colorama",
|
|
46
|
-
"Deprecated",
|
|
47
|
-
"python-dateutil",
|
|
48
47
|
"requests",
|
|
49
|
-
"typing_extensions>=4.5.0; python_version < '3.12'",
|
|
50
|
-
"unidecode",
|
|
48
|
+
# "typing_extensions>=4.5.0; python_version < '3.12'",
|
|
51
49
|
]
|
|
52
50
|
|
|
53
51
|
dynamic = ["version"]
|
|
@@ -59,7 +57,8 @@ Repository = "https://github.com/AbsoluteWinter/absfuyu-public"
|
|
|
59
57
|
Issues = "https://github.com/AbsoluteWinter/absfuyu-public/issues"
|
|
60
58
|
|
|
61
59
|
[project.optional-dependencies]
|
|
62
|
-
full = ["numpy", "pandas", "rich", "tqdm"]
|
|
60
|
+
full = ["numpy", "pandas", "rich", "tqdm", "unidecode"]
|
|
61
|
+
docs = ["numpy", "pandas", "rich"]
|
|
63
62
|
beautiful = ["rich"]
|
|
64
63
|
extra = ["numpy", "pandas"]
|
|
65
64
|
dev = ["hatch", "pytest"]
|
|
@@ -78,7 +77,7 @@ only-include = ["src", "tests", "docs", "images", "dev_requirements.txt"]
|
|
|
78
77
|
|
|
79
78
|
# Set up virtual env: use hatch env show
|
|
80
79
|
[tool.hatch.envs.default]
|
|
81
|
-
dependencies = ["coverage[toml]", "pytest
|
|
80
|
+
dependencies = ["coverage[toml]", "pytest", "pytest-cov"]
|
|
82
81
|
description = """
|
|
83
82
|
Default environment
|
|
84
83
|
|
|
@@ -96,6 +95,7 @@ cov = ["test-cov", "cov-report"] # use this
|
|
|
96
95
|
cov2 = "pytest --cov-report=term-missing --cov=absfuyu --cov=tests" # use this
|
|
97
96
|
|
|
98
97
|
[tool.hatch.envs.all]
|
|
98
|
+
dependencies = ["coverage[toml]", "pytest", "pytest-cov", "pytest-xdist"]
|
|
99
99
|
features = ["full"]
|
|
100
100
|
description = """
|
|
101
101
|
All python version to test:
|
|
@@ -106,6 +106,7 @@ Use `hatch run all:install` when occur "no module named" error
|
|
|
106
106
|
|
|
107
107
|
[tool.hatch.envs.all.scripts]
|
|
108
108
|
install = "pip install -e .[full]" # This command fix "no module named"
|
|
109
|
+
test2 = "pytest -n auto" # parallel test
|
|
109
110
|
|
|
110
111
|
[[tool.hatch.envs.all.matrix]] # hatch env run -e all test
|
|
111
112
|
python = ["3.11", "3.12", "3.13"]
|
|
@@ -120,9 +121,9 @@ check = "mypy --install-types --non-interactive {args:src/absfuyu}"
|
|
|
120
121
|
# check = "mypy --install-types --non-interactive {args:src/absfuyu tests}"
|
|
121
122
|
|
|
122
123
|
[tool.hatch.envs.docs]
|
|
123
|
-
features = ["
|
|
124
|
+
features = ["docs"]
|
|
124
125
|
dependencies = [
|
|
125
|
-
"sphinx>=
|
|
126
|
+
"sphinx>=8.1.0",
|
|
126
127
|
"sphinx_rtd_theme",
|
|
127
128
|
"sphinx_copybutton",
|
|
128
129
|
"myst-parser", # Markdown parser
|
|
@@ -138,13 +139,36 @@ Main cmd:
|
|
|
138
139
|
"""
|
|
139
140
|
|
|
140
141
|
[tool.hatch.envs.docs.scripts]
|
|
142
|
+
clean = [
|
|
143
|
+
"""
|
|
144
|
+
python -c "print('Cleaning up...')"
|
|
145
|
+
""",
|
|
146
|
+
"""
|
|
147
|
+
python -c "import shutil;from pathlib import Path;shutil.rmtree(Path.cwd().joinpath('docs', 'build'))"
|
|
148
|
+
""", # Delete docs/build/ folder
|
|
149
|
+
"""
|
|
150
|
+
python -c "from pathlib import Path;[x.unlink() for x in Path.cwd().joinpath('docs').glob('absfuyu*.rst')]"
|
|
151
|
+
""", # Clean .rst files in docs/ folder
|
|
152
|
+
"""
|
|
153
|
+
python -c "print('Cleaning up...DONE')"
|
|
154
|
+
""",
|
|
155
|
+
]
|
|
156
|
+
build_private = [
|
|
157
|
+
# -f --force
|
|
158
|
+
# -e --separate
|
|
159
|
+
# -M --module-first
|
|
160
|
+
# -P --private
|
|
161
|
+
"sphinx-apidoc -o docs/ src/absfuyu -feMP",
|
|
162
|
+
"sphinx-build docs docs/build",
|
|
163
|
+
]
|
|
141
164
|
build = [
|
|
142
|
-
"
|
|
143
|
-
"sphinx-
|
|
165
|
+
"clean",
|
|
166
|
+
"sphinx-apidoc -o docs/ src/absfuyu -eM", # Generate
|
|
167
|
+
"sphinx-build docs docs/build", # Build
|
|
144
168
|
]
|
|
145
169
|
live = [
|
|
146
|
-
"sphinx-apidoc -o docs/ src/absfuyu", # Generate
|
|
147
|
-
"sphinx-autobuild docs docs/build",
|
|
170
|
+
"sphinx-apidoc -o docs/ src/absfuyu -feM", # Generate
|
|
171
|
+
"sphinx-autobuild docs docs/build", # Live preview
|
|
148
172
|
]
|
|
149
173
|
|
|
150
174
|
[tool.hatch.envs.style]
|
|
@@ -179,9 +203,12 @@ Options:
|
|
|
179
203
|
"""
|
|
180
204
|
|
|
181
205
|
[tool.hatch.envs.workflow.scripts]
|
|
182
|
-
|
|
206
|
+
qa = [
|
|
183
207
|
"hatch run style:fmt", # Code quality check
|
|
184
208
|
"hatch run types:check", # type-hint check
|
|
209
|
+
]
|
|
210
|
+
test = [
|
|
211
|
+
"qa",
|
|
185
212
|
"hatch run all:test", # Test
|
|
186
213
|
]
|
|
187
214
|
build = [
|
|
@@ -243,7 +270,10 @@ addopts = [
|
|
|
243
270
|
]
|
|
244
271
|
markers = [ # pytest -m <marker> -v
|
|
245
272
|
"test_this: Select desire tests to test",
|
|
246
|
-
"
|
|
273
|
+
"abs_core: Test in absfuyu.core",
|
|
274
|
+
"abs_dxt: Test in absfuyu.dxt",
|
|
275
|
+
"abs_fun: Test in absfuyu.fun",
|
|
276
|
+
"abs_shape: Test in absfuyu.general.shape",
|
|
247
277
|
"abs_tools: Test in absfuyu.tools",
|
|
248
278
|
"abs_util: Test in absfuyu.util",
|
|
249
279
|
]
|
|
@@ -15,19 +15,19 @@ Normal import:
|
|
|
15
15
|
>>> import absfuyu
|
|
16
16
|
>>> help(absfuyu)
|
|
17
17
|
|
|
18
|
-
Using in cmd
|
|
18
|
+
Using in cmd:
|
|
19
19
|
``$ fuyu --help``
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
22
|
__title__ = "absfuyu"
|
|
23
23
|
__author__ = "AbsoluteWinter"
|
|
24
24
|
__license__ = "MIT License"
|
|
25
|
-
__version__ = "
|
|
25
|
+
__version__ = "5.0.0"
|
|
26
26
|
__all__ = [
|
|
27
27
|
"core",
|
|
28
28
|
"config",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
29
|
+
"dxt",
|
|
30
|
+
"extra",
|
|
31
31
|
"logger",
|
|
32
32
|
"fun",
|
|
33
33
|
"game",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ABSFUYU
|
|
3
|
+
-------
|
|
4
|
+
COMMAND LINE INTERFACE
|
|
5
|
+
|
|
6
|
+
Version: 5.0.0
|
|
7
|
+
Date updated: 18/02/2025 (dd/mm/yyyy)
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
# Library
|
|
11
|
+
# ---------------------------------------------------------------------------
|
|
12
|
+
try:
|
|
13
|
+
from absfuyu.cli import cli
|
|
14
|
+
except ModuleNotFoundError: # Check for `click`, `colorama`
|
|
15
|
+
from absfuyu.core.dummy_cli import cli
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Function
|
|
19
|
+
# ---------------------------------------------------------------------------
|
|
20
|
+
def main() -> None:
|
|
21
|
+
cli()
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# Run
|
|
25
|
+
# ---------------------------------------------------------------------------
|
|
26
|
+
if __name__ == "__main__":
|
|
27
|
+
main()
|
|
@@ -7,10 +7,17 @@ Version: 1.0.0
|
|
|
7
7
|
Date updated: 14/04/2024 (dd/mm/yyyy)
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
+
# Module Package
|
|
11
|
+
# ---------------------------------------------------------------------------
|
|
10
12
|
__all__ = ["COLOR"]
|
|
11
13
|
|
|
14
|
+
|
|
15
|
+
# Library
|
|
16
|
+
# ---------------------------------------------------------------------------
|
|
12
17
|
import colorama
|
|
13
18
|
|
|
19
|
+
# Color
|
|
20
|
+
# ---------------------------------------------------------------------------
|
|
14
21
|
COLOR = {
|
|
15
22
|
"green": colorama.Fore.LIGHTGREEN_EX,
|
|
16
23
|
"GREEN": colorama.Fore.GREEN,
|
|
@@ -16,7 +16,6 @@ import click
|
|
|
16
16
|
from absfuyu import __title__
|
|
17
17
|
from absfuyu.cli.color import COLOR
|
|
18
18
|
from absfuyu.core import __package_feature__
|
|
19
|
-
from absfuyu.general.human import Human2
|
|
20
19
|
from absfuyu.tools.shutdownizer import ShutDownizer
|
|
21
20
|
from absfuyu.util.zipped import Zipper
|
|
22
21
|
from absfuyu.version import PkgVersion
|
|
@@ -60,37 +59,6 @@ def install(pkg: str) -> None:
|
|
|
60
59
|
click.echo(f"{COLOR['green']}absfuyu[{pkg}] installed")
|
|
61
60
|
|
|
62
61
|
|
|
63
|
-
@click.command()
|
|
64
|
-
def advice() -> None:
|
|
65
|
-
"""Give some recommendation when bored"""
|
|
66
|
-
from absfuyu.fun import im_bored
|
|
67
|
-
|
|
68
|
-
click.echo(f"{COLOR['green']}{im_bored()}")
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
@click.command(name="fs")
|
|
72
|
-
@click.argument("date", type=str)
|
|
73
|
-
@click.argument("number_string", type=str)
|
|
74
|
-
def fs(date: str, number_string: str) -> None:
|
|
75
|
-
"""Feng-shui W.I.P"""
|
|
76
|
-
|
|
77
|
-
instance = Human2(date)
|
|
78
|
-
print(instance.fs(number_string))
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
@click.command(name="info")
|
|
82
|
-
@click.argument("date", type=str)
|
|
83
|
-
def info(date: str) -> None:
|
|
84
|
-
"""
|
|
85
|
-
Day info, format: yyyymmdd
|
|
86
|
-
|
|
87
|
-
Remake this
|
|
88
|
-
"""
|
|
89
|
-
|
|
90
|
-
instance = Human2(date)
|
|
91
|
-
print(instance.info())
|
|
92
|
-
|
|
93
|
-
|
|
94
62
|
@click.command(name="unzip")
|
|
95
63
|
@click.argument("dir", type=str)
|
|
96
64
|
def unzip_files_in_dir(dir: str) -> None:
|
|
@@ -116,8 +84,5 @@ def do_group() -> None:
|
|
|
116
84
|
|
|
117
85
|
do_group.add_command(update)
|
|
118
86
|
do_group.add_command(install)
|
|
119
|
-
do_group.add_command(advice)
|
|
120
|
-
do_group.add_command(fs)
|
|
121
|
-
do_group.add_command(info)
|
|
122
87
|
do_group.add_command(unzip_files_in_dir)
|
|
123
88
|
do_group.add_command(os_shutdown)
|
|
@@ -59,19 +59,19 @@ from absfuyu.tools.converter import Base64EncodeDecode, Text2Chemistry
|
|
|
59
59
|
)
|
|
60
60
|
def file_checksum(
|
|
61
61
|
file_path: str,
|
|
62
|
-
hash_mode:
|
|
62
|
+
hash_mode: Literal["md5", "sha1", "sha256", "sha512"],
|
|
63
63
|
save_result: bool,
|
|
64
64
|
recursive_mode: bool,
|
|
65
|
-
hash_to_compare: str,
|
|
65
|
+
hash_to_compare: str | None,
|
|
66
66
|
) -> None:
|
|
67
67
|
"""Checksum for file/directory"""
|
|
68
68
|
# print(hash_mode, save_result, recursive_mode)
|
|
69
69
|
instance = Checksum(file_path, hash_mode=hash_mode, save_result_to_file=save_result)
|
|
70
70
|
res = instance.checksum(recursive=recursive_mode)
|
|
71
|
-
if hash_to_compare:
|
|
72
|
-
print(res == hash_to_compare)
|
|
73
|
-
else:
|
|
71
|
+
if hash_to_compare is None:
|
|
74
72
|
print(res)
|
|
73
|
+
else:
|
|
74
|
+
print(res == hash_to_compare)
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
@click.command(name="t2c")
|