absfuyu 3.1.1__py3-none-any.whl → 3.3.3__py3-none-any.whl
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/__init__.py +3 -10
- absfuyu/__main__.py +5 -250
- absfuyu/cli/__init__.py +51 -0
- absfuyu/cli/color.py +24 -0
- absfuyu/cli/config_group.py +56 -0
- absfuyu/cli/do_group.py +76 -0
- absfuyu/cli/game_group.py +109 -0
- absfuyu/config/__init__.py +117 -100
- absfuyu/config/config.json +0 -7
- absfuyu/core.py +5 -66
- absfuyu/everything.py +7 -9
- absfuyu/extensions/beautiful.py +30 -23
- absfuyu/extensions/dev/__init__.py +11 -8
- absfuyu/extensions/dev/password_hash.py +4 -2
- absfuyu/extensions/dev/passwordlib.py +7 -5
- absfuyu/extensions/dev/project_starter.py +4 -2
- absfuyu/extensions/dev/shutdownizer.py +148 -0
- absfuyu/extensions/extra/__init__.py +1 -2
- absfuyu/extensions/extra/data_analysis.py +182 -107
- absfuyu/fun/WGS.py +50 -26
- absfuyu/fun/__init__.py +6 -7
- absfuyu/fun/tarot.py +1 -1
- absfuyu/game/__init__.py +75 -81
- absfuyu/game/game_stat.py +36 -0
- absfuyu/game/sudoku.py +41 -48
- absfuyu/game/tictactoe.py +303 -548
- absfuyu/game/wordle.py +56 -47
- absfuyu/general/__init__.py +17 -7
- absfuyu/general/content.py +16 -15
- absfuyu/general/data_extension.py +282 -90
- absfuyu/general/generator.py +67 -67
- absfuyu/general/human.py +74 -78
- absfuyu/logger.py +94 -68
- absfuyu/pkg_data/__init__.py +29 -25
- absfuyu/py.typed +0 -0
- absfuyu/sort.py +61 -47
- absfuyu/tools/__init__.py +0 -1
- absfuyu/tools/converter.py +80 -62
- absfuyu/tools/keygen.py +62 -67
- absfuyu/tools/obfuscator.py +57 -53
- absfuyu/tools/stats.py +24 -24
- absfuyu/tools/web.py +10 -9
- absfuyu/util/__init__.py +71 -33
- absfuyu/util/api.py +53 -43
- absfuyu/util/json_method.py +25 -27
- absfuyu/util/lunar.py +20 -24
- absfuyu/util/path.py +362 -241
- absfuyu/util/performance.py +217 -135
- absfuyu/util/pkl.py +8 -8
- absfuyu/util/zipped.py +17 -19
- absfuyu/version.py +160 -147
- absfuyu-3.3.3.dist-info/METADATA +124 -0
- absfuyu-3.3.3.dist-info/RECORD +59 -0
- {absfuyu-3.1.1.dist-info → absfuyu-3.3.3.dist-info}/WHEEL +1 -2
- {absfuyu-3.1.1.dist-info → absfuyu-3.3.3.dist-info}/entry_points.txt +1 -0
- {absfuyu-3.1.1.dist-info → absfuyu-3.3.3.dist-info/licenses}/LICENSE +1 -1
- absfuyu/extensions/dev/pkglib.py +0 -98
- absfuyu/game/tictactoe2.py +0 -318
- absfuyu-3.1.1.dist-info/METADATA +0 -215
- absfuyu-3.1.1.dist-info/RECORD +0 -55
- absfuyu-3.1.1.dist-info/top_level.txt +0 -1
absfuyu/version.py
CHANGED
|
@@ -3,16 +3,11 @@ Absfuyu: Version
|
|
|
3
3
|
----------------
|
|
4
4
|
Package versioning module
|
|
5
5
|
|
|
6
|
-
Version: 2.
|
|
7
|
-
Date updated:
|
|
6
|
+
Version: 2.1.1
|
|
7
|
+
Date updated: 14/04/2024 (dd/mm/yyyy)
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
# Module level
|
|
12
|
-
###########################################################################
|
|
13
10
|
__all__ = [
|
|
14
|
-
# Version
|
|
15
|
-
"__version__",
|
|
16
11
|
# Options
|
|
17
12
|
"ReleaseOption",
|
|
18
13
|
"ReleaseLevel",
|
|
@@ -22,21 +17,17 @@ __all__ = [
|
|
|
22
17
|
"PkgVersion",
|
|
23
18
|
]
|
|
24
19
|
|
|
25
|
-
|
|
26
|
-
###########################################################################
|
|
20
|
+
|
|
27
21
|
import json
|
|
22
|
+
import re
|
|
28
23
|
import subprocess
|
|
29
|
-
from typing import List
|
|
24
|
+
from typing import List, Tuple, TypedDict, Union
|
|
30
25
|
from urllib.error import URLError
|
|
31
26
|
from urllib.request import Request, urlopen
|
|
32
27
|
|
|
33
|
-
from absfuyu import __title__
|
|
34
|
-
from absfuyu.config import ABSFUYU_CONFIG, Config
|
|
35
28
|
from absfuyu.logger import logger
|
|
36
29
|
|
|
37
30
|
|
|
38
|
-
# Class
|
|
39
|
-
###########################################################################
|
|
40
31
|
class ReleaseOption:
|
|
41
32
|
"""
|
|
42
33
|
``MAJOR``, ``MINOR``, ``PATCH``
|
|
@@ -46,10 +37,9 @@ class ReleaseOption:
|
|
|
46
37
|
MINOR: str = "minor"
|
|
47
38
|
PATCH: str = "patch"
|
|
48
39
|
|
|
49
|
-
#
|
|
50
|
-
def all_option() -> List[str]:
|
|
40
|
+
def all_option() -> List[str]: # type: ignore
|
|
51
41
|
"""Return a list of release options"""
|
|
52
|
-
return [__class__.MAJOR, __class__.MINOR, __class__.PATCH]
|
|
42
|
+
return [__class__.MAJOR, __class__.MINOR, __class__.PATCH] # type: ignore
|
|
53
43
|
|
|
54
44
|
|
|
55
45
|
class ReleaseLevel:
|
|
@@ -61,10 +51,27 @@ class ReleaseLevel:
|
|
|
61
51
|
DEV: str = "dev"
|
|
62
52
|
RC: str = "rc" # Release candidate
|
|
63
53
|
|
|
64
|
-
#
|
|
65
|
-
def all_level() -> List[str]:
|
|
54
|
+
def all_level() -> List[str]: # type: ignore
|
|
66
55
|
"""Return a list of release levels"""
|
|
67
|
-
return [__class__.FINAL, __class__.DEV, __class__.RC]
|
|
56
|
+
return [__class__.FINAL, __class__.DEV, __class__.RC] # type: ignore
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class VersionDictFormat(TypedDict):
|
|
60
|
+
"""
|
|
61
|
+
Format for the ``version`` section in ``config``
|
|
62
|
+
|
|
63
|
+
:param major: Major changes
|
|
64
|
+
:param minor: Minor changes
|
|
65
|
+
:param patch: Patches and fixes
|
|
66
|
+
:param release_level: Release level
|
|
67
|
+
:param serial: Release serial
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
major: int
|
|
71
|
+
minor: int
|
|
72
|
+
patch: int
|
|
73
|
+
release_level: str
|
|
74
|
+
serial: int
|
|
68
75
|
|
|
69
76
|
|
|
70
77
|
class Version:
|
|
@@ -72,31 +79,31 @@ class Version:
|
|
|
72
79
|
|
|
73
80
|
def __init__(
|
|
74
81
|
self,
|
|
75
|
-
major: int,
|
|
76
|
-
minor: int,
|
|
77
|
-
patch: int,
|
|
82
|
+
major: Union[int, str],
|
|
83
|
+
minor: Union[int, str],
|
|
84
|
+
patch: Union[int, str],
|
|
78
85
|
release_level: str = ReleaseLevel.FINAL,
|
|
79
|
-
serial: int = 0,
|
|
86
|
+
serial: Union[int, str] = 0,
|
|
80
87
|
) -> None:
|
|
81
88
|
"""
|
|
82
89
|
Create ``Version`` instance
|
|
83
90
|
|
|
84
91
|
:param major: Major change
|
|
85
|
-
:type major: int
|
|
92
|
+
:type major: int | str
|
|
86
93
|
:param minor: Minor change
|
|
87
|
-
:type minor: int
|
|
94
|
+
:type minor: int | str
|
|
88
95
|
:param patch: Patch
|
|
89
|
-
:type patch: int
|
|
96
|
+
:type patch: int | str
|
|
90
97
|
:param release_level: Release level: ``final``|``rc``|``dev``
|
|
91
98
|
:type release_level: str
|
|
92
99
|
:param serial: Serial for release level ``rc``|``dev``
|
|
93
|
-
:type serial: int
|
|
100
|
+
:type serial: int | str
|
|
94
101
|
"""
|
|
95
|
-
self.major: int = major
|
|
96
|
-
self.minor: int = minor
|
|
97
|
-
self.patch: int = patch
|
|
102
|
+
self.major: int = major if isinstance(major, int) else int(major)
|
|
103
|
+
self.minor: int = minor if isinstance(minor, int) else int(minor)
|
|
104
|
+
self.patch: int = patch if isinstance(patch, int) else int(patch)
|
|
98
105
|
self.release_level: str = release_level
|
|
99
|
-
self.serial: int = serial
|
|
106
|
+
self.serial: int = serial if isinstance(serial, int) else int(serial)
|
|
100
107
|
|
|
101
108
|
def __str__(self) -> str:
|
|
102
109
|
return self.version
|
|
@@ -105,7 +112,35 @@ class Version:
|
|
|
105
112
|
if self.release_level.startswith(ReleaseLevel.FINAL):
|
|
106
113
|
return f"{self.__class__.__name__}(major={self.major}, minor={self.minor}, patch={self.patch})"
|
|
107
114
|
else:
|
|
108
|
-
return
|
|
115
|
+
return (
|
|
116
|
+
f"{self.__class__.__name__}("
|
|
117
|
+
f"major={self.major}, minor={self.minor}, patch={self.patch}, "
|
|
118
|
+
f"release_level={self.release_level}, serial={self.serial})"
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
def __format__(self, format_spec: str) -> str:
|
|
122
|
+
"""
|
|
123
|
+
Change format of an object.
|
|
124
|
+
Avaiable option: ``full``
|
|
125
|
+
|
|
126
|
+
Usage
|
|
127
|
+
-----
|
|
128
|
+
>>> print(f"{<object>:<format_spec>}")
|
|
129
|
+
>>> print(<object>.__format__(<format_spec>))
|
|
130
|
+
>>> print(format(<object>, <format_spec>))
|
|
131
|
+
|
|
132
|
+
Example:
|
|
133
|
+
--------
|
|
134
|
+
>>> test = Version(1, 0, 0)
|
|
135
|
+
>>> print(f"{test:full}")
|
|
136
|
+
1.0.0.final0
|
|
137
|
+
"""
|
|
138
|
+
# Logic
|
|
139
|
+
if format_spec.lower().startswith("full"):
|
|
140
|
+
return f"{self.major}.{self.minor}.{self.patch}.{self.release_level}{self.serial}"
|
|
141
|
+
|
|
142
|
+
# Else
|
|
143
|
+
return self.__str__()
|
|
109
144
|
|
|
110
145
|
@property
|
|
111
146
|
def version(self) -> str:
|
|
@@ -130,15 +165,27 @@ class Version:
|
|
|
130
165
|
return f"{self.major}.{self.minor}.{self.patch}.{self.release_level}{self.serial}"
|
|
131
166
|
|
|
132
167
|
@classmethod
|
|
133
|
-
def from_tuple(
|
|
168
|
+
def from_tuple(
|
|
169
|
+
cls, iterable: Union[Tuple[int, int, int], Tuple[int, int, int, str, int]]
|
|
170
|
+
):
|
|
134
171
|
"""
|
|
135
172
|
Convert to ``Version`` from a ``tuple``
|
|
136
173
|
|
|
174
|
+
Parameters
|
|
175
|
+
----------
|
|
176
|
+
iterable : tuple[int, int, int] | tuple[int, int, int, str, int]
|
|
177
|
+
Version tuple in correct format
|
|
178
|
+
|
|
137
179
|
Returns
|
|
138
180
|
-------
|
|
139
181
|
Version
|
|
140
182
|
Version
|
|
141
183
|
|
|
184
|
+
Raises
|
|
185
|
+
------
|
|
186
|
+
ValueError
|
|
187
|
+
Wrong tuple format
|
|
188
|
+
|
|
142
189
|
|
|
143
190
|
Example:
|
|
144
191
|
--------
|
|
@@ -155,12 +202,58 @@ class Version:
|
|
|
155
202
|
else:
|
|
156
203
|
raise ValueError("iterable must have len of 5 or 3")
|
|
157
204
|
|
|
158
|
-
|
|
205
|
+
@classmethod
|
|
206
|
+
def from_str(cls, version_string: str):
|
|
207
|
+
"""
|
|
208
|
+
Convert to ``Version`` from a ``str``
|
|
209
|
+
|
|
210
|
+
Parameters
|
|
211
|
+
----------
|
|
212
|
+
version_string : str
|
|
213
|
+
| Version str in correct format
|
|
214
|
+
| ``<major>.<minor>.<patch>``
|
|
215
|
+
| ``<major>.<minor>.<patch>.<release level><serial>``
|
|
216
|
+
|
|
217
|
+
Returns
|
|
218
|
+
-------
|
|
219
|
+
Version
|
|
220
|
+
Version
|
|
221
|
+
|
|
222
|
+
Raises
|
|
223
|
+
------
|
|
224
|
+
ValueError
|
|
225
|
+
Wrong version_string format
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
Example:
|
|
229
|
+
--------
|
|
230
|
+
>>> test = Version.from_str("1.0.0")
|
|
231
|
+
>>> test.version
|
|
232
|
+
1.0.0
|
|
233
|
+
"""
|
|
234
|
+
short_ver_pattern = re.compile(r"\b(\d)+\.(\d+)\.(\d+)\b")
|
|
235
|
+
long_ver_pattern = re.compile(r"\b(\d)+\.(\d+)\.(\d+)\.(dev|rc|final)(\d+)\b")
|
|
236
|
+
ver = version_string.lower().strip()
|
|
237
|
+
|
|
238
|
+
long_ver = re.search(long_ver_pattern, ver)
|
|
239
|
+
if long_ver:
|
|
240
|
+
return cls.from_tuple(long_ver.groups()) # type: ignore
|
|
241
|
+
|
|
242
|
+
short_ver = re.search(short_ver_pattern, ver)
|
|
243
|
+
if short_ver:
|
|
244
|
+
return cls.from_tuple(short_ver.groups()) # type: ignore
|
|
245
|
+
|
|
246
|
+
raise ValueError("Wrong version_string format")
|
|
247
|
+
|
|
248
|
+
def to_dict(self) -> VersionDictFormat:
|
|
159
249
|
"""
|
|
160
250
|
Convert ``Version`` into ``dict``
|
|
161
251
|
|
|
162
|
-
|
|
163
|
-
|
|
252
|
+
Returns
|
|
253
|
+
-------
|
|
254
|
+
VersionDictFormat
|
|
255
|
+
Version dict
|
|
256
|
+
|
|
164
257
|
|
|
165
258
|
Example:
|
|
166
259
|
--------
|
|
@@ -174,13 +267,14 @@ class Version:
|
|
|
174
267
|
"serial": 0
|
|
175
268
|
}
|
|
176
269
|
"""
|
|
177
|
-
|
|
270
|
+
out: VersionDictFormat = {
|
|
178
271
|
"major": self.major,
|
|
179
272
|
"minor": self.minor,
|
|
180
273
|
"patch": self.patch,
|
|
181
274
|
"release_level": self.release_level,
|
|
182
275
|
"serial": self.serial,
|
|
183
276
|
}
|
|
277
|
+
return out
|
|
184
278
|
|
|
185
279
|
|
|
186
280
|
class Bumper(Version):
|
|
@@ -190,7 +284,6 @@ class Bumper(Version):
|
|
|
190
284
|
"""
|
|
191
285
|
Bumping major, minor, patch
|
|
192
286
|
"""
|
|
193
|
-
logger.debug(f"Before: {self.version}")
|
|
194
287
|
|
|
195
288
|
if release_option.startswith(ReleaseOption.MAJOR):
|
|
196
289
|
self.major += 1
|
|
@@ -202,8 +295,6 @@ class Bumper(Version):
|
|
|
202
295
|
else:
|
|
203
296
|
self.patch += 1
|
|
204
297
|
|
|
205
|
-
logger.debug(f"After: {self.version}")
|
|
206
|
-
|
|
207
298
|
def bump(
|
|
208
299
|
self, *, option: str = ReleaseOption.PATCH, channel: str = ReleaseLevel.FINAL
|
|
209
300
|
) -> None:
|
|
@@ -232,10 +323,10 @@ class Bumper(Version):
|
|
|
232
323
|
"""
|
|
233
324
|
# Check conditions - use default values if fail
|
|
234
325
|
if option not in ReleaseOption.all_option():
|
|
235
|
-
logger.
|
|
326
|
+
logger.warning(f"Available option: {ReleaseOption.all_option()}")
|
|
236
327
|
option = ReleaseOption.PATCH
|
|
237
328
|
if channel not in ReleaseLevel.all_level():
|
|
238
|
-
logger.
|
|
329
|
+
logger.warning(f"Available level: {ReleaseLevel.all_level()}")
|
|
239
330
|
channel = ReleaseLevel.FINAL
|
|
240
331
|
logger.debug(f"Target: {option} {channel}")
|
|
241
332
|
|
|
@@ -273,33 +364,12 @@ class Bumper(Version):
|
|
|
273
364
|
self._bump_ver(option)
|
|
274
365
|
|
|
275
366
|
|
|
276
|
-
class PkgVersion
|
|
367
|
+
class PkgVersion:
|
|
277
368
|
"""
|
|
278
|
-
|
|
369
|
+
Package Version
|
|
279
370
|
"""
|
|
280
371
|
|
|
281
|
-
def __init__(self, package_name: str
|
|
282
|
-
"""
|
|
283
|
-
package_name: Name of the package
|
|
284
|
-
config_file_handler: Config file handler
|
|
285
|
-
"""
|
|
286
|
-
|
|
287
|
-
# Get config
|
|
288
|
-
try:
|
|
289
|
-
self.config_file = config_file_handler
|
|
290
|
-
version: dict = self.config_file.version
|
|
291
|
-
except Exception as e:
|
|
292
|
-
logger.error("Can't load config file")
|
|
293
|
-
raise ValueError(e)
|
|
294
|
-
|
|
295
|
-
# Set version
|
|
296
|
-
self.major: int = version.get("major")
|
|
297
|
-
self.minor: int = version.get("minor")
|
|
298
|
-
self.patch: int = version.get("patch")
|
|
299
|
-
self.release_level: str = version.get("release_level")
|
|
300
|
-
self.serial: int = version.get("serial")
|
|
301
|
-
|
|
302
|
-
# Set package name
|
|
372
|
+
def __init__(self, package_name: str) -> None:
|
|
303
373
|
self.package_name = package_name
|
|
304
374
|
|
|
305
375
|
# Check for update
|
|
@@ -317,7 +387,7 @@ class PkgVersion(Bumper):
|
|
|
317
387
|
elif hasattr(e, "code"):
|
|
318
388
|
logger.error("The server couldn't fulfill the request.")
|
|
319
389
|
logger.error("Error code: ", e.code)
|
|
320
|
-
except:
|
|
390
|
+
except Exception:
|
|
321
391
|
logger.error("Fetch failed!")
|
|
322
392
|
else:
|
|
323
393
|
return response.read().decode()
|
|
@@ -328,8 +398,16 @@ class PkgVersion(Bumper):
|
|
|
328
398
|
"""
|
|
329
399
|
rss = f"https://pypi.org/rss/project/{self.package_name}/releases.xml"
|
|
330
400
|
xml_file: str = self._fetch_data_from_server(rss)
|
|
331
|
-
ver = xml_file[
|
|
332
|
-
|
|
401
|
+
ver = xml_file[
|
|
402
|
+
xml_file.find("<item>") : xml_file.find(
|
|
403
|
+
"</item>"
|
|
404
|
+
) # noqa: E203
|
|
405
|
+
] # First item
|
|
406
|
+
version = ver[
|
|
407
|
+
ver.find("<title>") + len("<title>") : ver.find(
|
|
408
|
+
"</title>"
|
|
409
|
+
) # noqa: E203
|
|
410
|
+
]
|
|
333
411
|
return version
|
|
334
412
|
|
|
335
413
|
def _load_data_from_json(self, json_link: str) -> dict:
|
|
@@ -337,7 +415,7 @@ class PkgVersion(Bumper):
|
|
|
337
415
|
Load data from api then convert to json
|
|
338
416
|
"""
|
|
339
417
|
json_file: str = self._fetch_data_from_server(json_link)
|
|
340
|
-
return json.loads(json_file)
|
|
418
|
+
return json.loads(json_file) # type: ignore
|
|
341
419
|
|
|
342
420
|
def _get_latest_version(self) -> str:
|
|
343
421
|
"""
|
|
@@ -369,9 +447,17 @@ class PkgVersion(Bumper):
|
|
|
369
447
|
|
|
370
448
|
try:
|
|
371
449
|
latest = self._get_latest_version()
|
|
372
|
-
except:
|
|
450
|
+
except Exception:
|
|
373
451
|
latest = self._get_latest_version_legacy()
|
|
374
|
-
|
|
452
|
+
|
|
453
|
+
try:
|
|
454
|
+
import importlib
|
|
455
|
+
|
|
456
|
+
_pk = importlib.__import__(self.package_name)
|
|
457
|
+
current: str = _pk.__version__
|
|
458
|
+
except Exception:
|
|
459
|
+
current = ""
|
|
460
|
+
|
|
375
461
|
logger.debug(f"Current: {current} | Lastest: {latest}")
|
|
376
462
|
|
|
377
463
|
if current == latest:
|
|
@@ -381,7 +467,7 @@ class PkgVersion(Bumper):
|
|
|
381
467
|
print(f"Newer version ({latest}) available. Upgrading...")
|
|
382
468
|
try:
|
|
383
469
|
self._get_update()
|
|
384
|
-
except:
|
|
470
|
+
except Exception:
|
|
385
471
|
print(
|
|
386
472
|
f"""
|
|
387
473
|
Unable to perform update.
|
|
@@ -393,76 +479,3 @@ class PkgVersion(Bumper):
|
|
|
393
479
|
print(
|
|
394
480
|
f"Newer version ({latest}) available. Upgrade with:\npip install -U {self.package_name}=={latest}"
|
|
395
481
|
)
|
|
396
|
-
|
|
397
|
-
# Bump version
|
|
398
|
-
def bump_version(
|
|
399
|
-
self, option: str = ReleaseOption.PATCH, channel: str = ReleaseLevel.FINAL
|
|
400
|
-
) -> str:
|
|
401
|
-
"""
|
|
402
|
-
Bump current version and save
|
|
403
|
-
|
|
404
|
-
Parameters
|
|
405
|
-
----------
|
|
406
|
-
option : str
|
|
407
|
-
Release option
|
|
408
|
-
(Default: ``"patch"``)
|
|
409
|
-
|
|
410
|
-
channel : str
|
|
411
|
-
Release channel
|
|
412
|
-
(Default: ``"final"``)
|
|
413
|
-
|
|
414
|
-
Returns
|
|
415
|
-
-------
|
|
416
|
-
str
|
|
417
|
-
Bumped version string
|
|
418
|
-
"""
|
|
419
|
-
self.bump(option=option, channel=channel) # Bump
|
|
420
|
-
self.config_file.update_version(self.to_dict()) # Save to config
|
|
421
|
-
return self.version
|
|
422
|
-
|
|
423
|
-
# Release package
|
|
424
|
-
def _release_to_pypi(
|
|
425
|
-
self,
|
|
426
|
-
option: str = ReleaseOption.PATCH,
|
|
427
|
-
channel: str = ReleaseLevel.FINAL,
|
|
428
|
-
safety_lock_off: bool = False,
|
|
429
|
-
) -> None:
|
|
430
|
-
"""
|
|
431
|
-
Developer only! Not intended for end-user
|
|
432
|
-
|
|
433
|
-
option: ReleaseOption
|
|
434
|
-
channel: ReleaseLevel
|
|
435
|
-
safety_lock_off: Set to `True` to execute this function
|
|
436
|
-
"""
|
|
437
|
-
if not safety_lock_off:
|
|
438
|
-
return None
|
|
439
|
-
|
|
440
|
-
logger.debug("Bumping version...")
|
|
441
|
-
|
|
442
|
-
self.bump_version(option=option, channel=channel)
|
|
443
|
-
|
|
444
|
-
logger.debug(f"Version bumped. Current verion: {self.version}")
|
|
445
|
-
logger.debug("Building package...")
|
|
446
|
-
|
|
447
|
-
try:
|
|
448
|
-
cmds = ["python -m build".split(), "twine upload dist/*".split()]
|
|
449
|
-
for cmd in cmds:
|
|
450
|
-
subprocess.run(cmd)
|
|
451
|
-
logger.debug("Release published!")
|
|
452
|
-
except Exception as e:
|
|
453
|
-
logger.error(f"Release failed!\n\n{e}")
|
|
454
|
-
return None
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
# Init
|
|
458
|
-
###########################################################################
|
|
459
|
-
_AbsfuyuPackage = PkgVersion(package_name=__title__, config_file_handler=ABSFUYU_CONFIG)
|
|
460
|
-
# global __version__
|
|
461
|
-
__version__ = str(_AbsfuyuPackage)
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
# Run
|
|
465
|
-
###########################################################################
|
|
466
|
-
if __name__ == "__main__":
|
|
467
|
-
logger.setLevel(10)
|
|
468
|
-
print(__version__)
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: absfuyu
|
|
3
|
+
Version: 3.3.3
|
|
4
|
+
Summary: A small collection of code
|
|
5
|
+
Project-URL: Homepage, https://github.com/AbsoluteWinter/absfuyu-public
|
|
6
|
+
Project-URL: Documentation, https://absolutewinter.github.io/absfuyu-docs/
|
|
7
|
+
Project-URL: Repository, https://github.com/AbsoluteWinter/absfuyu-public
|
|
8
|
+
Project-URL: Issues, https://github.com/AbsoluteWinter/absfuyu-public/issues
|
|
9
|
+
Author: somewhatcold (AbsoluteWinter)
|
|
10
|
+
License: MIT License
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: utilities
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Natural Language :: English
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
26
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
27
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
28
|
+
Classifier: Topic :: Utilities
|
|
29
|
+
Requires-Python: <4,>=3.8
|
|
30
|
+
Requires-Dist: bs4
|
|
31
|
+
Requires-Dist: click>=8.0.0
|
|
32
|
+
Requires-Dist: colorama
|
|
33
|
+
Requires-Dist: deprecated
|
|
34
|
+
Requires-Dist: importlib-resources; python_version < '3.10'
|
|
35
|
+
Requires-Dist: python-dateutil
|
|
36
|
+
Requires-Dist: requests
|
|
37
|
+
Requires-Dist: tomli>=1.1.0; python_version < '3.11'
|
|
38
|
+
Requires-Dist: typing-extensions>=4.0.1; python_version < '3.11'
|
|
39
|
+
Requires-Dist: unidecode
|
|
40
|
+
Provides-Extra: beautiful
|
|
41
|
+
Requires-Dist: rich; extra == 'beautiful'
|
|
42
|
+
Provides-Extra: dev
|
|
43
|
+
Requires-Dist: hatch; extra == 'dev'
|
|
44
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
45
|
+
Provides-Extra: extra
|
|
46
|
+
Requires-Dist: numpy; extra == 'extra'
|
|
47
|
+
Requires-Dist: pandas; extra == 'extra'
|
|
48
|
+
Provides-Extra: full
|
|
49
|
+
Requires-Dist: absfuyu-res; extra == 'full'
|
|
50
|
+
Requires-Dist: numpy; extra == 'full'
|
|
51
|
+
Requires-Dist: pandas; extra == 'full'
|
|
52
|
+
Requires-Dist: rich; extra == 'full'
|
|
53
|
+
Provides-Extra: res
|
|
54
|
+
Requires-Dist: absfuyu-res; extra == 'res'
|
|
55
|
+
Description-Content-Type: text/markdown
|
|
56
|
+
|
|
57
|
+
<div align="center">
|
|
58
|
+
<h1 align="center">
|
|
59
|
+
<img src="https://github.com/AbsoluteWinter/AbsoluteWinter.github.io/blob/main/absfuyu/images/repository-image-crop.png?raw=true" alt="absfuyu"/>
|
|
60
|
+
</h1>
|
|
61
|
+
<p align="center">
|
|
62
|
+
<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>
|
|
63
|
+
<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>
|
|
64
|
+
<a href="https://pypi.org/project/absfuyu/"><img src="https://img.shields.io/pypi/v/absfuyu?style=flat-square&logo=pypi" /></a>
|
|
65
|
+
<a><img src="https://img.shields.io/pypi/l/absfuyu?style=flat-square&logo=github&color=blue"/></a>
|
|
66
|
+
<a><img src="https://img.shields.io/badge/code%20style-black-black?style=flat-square"/></a>
|
|
67
|
+
<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>
|
|
68
|
+
</p>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## **SUMMARY:**
|
|
75
|
+
|
|
76
|
+
*TL;DR: A collection of code*
|
|
77
|
+
|
|
78
|
+
## **INSTALLATION:**
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
$ pip install -U absfuyu
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## **USAGE:**
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
import absfuyu
|
|
88
|
+
help(absfuyu)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## **DOCUMENTATION:**
|
|
92
|
+
|
|
93
|
+
> [here](https://absolutewinter.github.io/absfuyu/)
|
|
94
|
+
|
|
95
|
+
## **DEV SETUP**
|
|
96
|
+
|
|
97
|
+
1. Create virtual environment
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
python -m venv env
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Note: Might need to run this in powershell (windows)
|
|
104
|
+
|
|
105
|
+
```powershell
|
|
106
|
+
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
2. Install required packages
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
python -m pip install -e .[full,dev]
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
3. Getting info of dev environment
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
hatch env show
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
## **LICENSE:**
|
|
123
|
+
|
|
124
|
+
MIT License
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
absfuyu/__init__.py,sha256=26MeNqj5nT-GStEbVr6_mBWTADIaRyWIjWDYTadUKL4,638
|
|
2
|
+
absfuyu/__main__.py,sha256=OpMwc35W5VANzw6gvlqJaJOl2H89i_frFZbleUQwDss,163
|
|
3
|
+
absfuyu/core.py,sha256=HYEbVQ_zKFyMje6pwssw53RojT1RwMjZsA0F6jInxMg,1248
|
|
4
|
+
absfuyu/everything.py,sha256=PGIXlqgxyADFPygohVYVIb7fZz72L_xXrlLX0WImuYg,788
|
|
5
|
+
absfuyu/logger.py,sha256=vT0CniqNv-cNXbtkhu1jaOhehHvlInHQt1PFsna5qIY,13135
|
|
6
|
+
absfuyu/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
absfuyu/sort.py,sha256=Z9nK15WehmZjlUNwvAOwF4FhV-rFcqlXkCcehNYmo78,6827
|
|
8
|
+
absfuyu/version.py,sha256=KMaeXNl93L4VU2RnTySoFv23IDyTvHfy84nyatFcKaE,14128
|
|
9
|
+
absfuyu/cli/__init__.py,sha256=I2T8ypj2LA3WRnjSllHZzWZBzd5VW5OCVQnqV9IQqFs,1106
|
|
10
|
+
absfuyu/cli/color.py,sha256=7M3XqFllt26tv_NR5qKgyTId6wnVADtUB74cDYy8pOQ,497
|
|
11
|
+
absfuyu/cli/config_group.py,sha256=FsyYm2apSyAA2PAD12CpHAizenRds_QlLf8j0AlLuVo,1230
|
|
12
|
+
absfuyu/cli/do_group.py,sha256=bz3fEpsiicvOR-D5tAe6WcPFiYecpH3yqdh2Z5v-GOA,1815
|
|
13
|
+
absfuyu/cli/game_group.py,sha256=ySpL2hm4VCplhNY0s22kBGI5eFCdJj9fm1T58yftU74,2348
|
|
14
|
+
absfuyu/config/__init__.py,sha256=Rowa9XlSQiXVRdbL_6wOh7eWAm1jyPG4sPn_WjBj8D0,8650
|
|
15
|
+
absfuyu/config/config.json,sha256=-ZQnmDuLq0aAFfsrQbSNR3tq5k9Eu9IVUQgYD9htIQM,646
|
|
16
|
+
absfuyu/extensions/__init__.py,sha256=hxeZm3w00K4GC78cDTIo5ROWiWAZw4zEmlevfOqbNvo,146
|
|
17
|
+
absfuyu/extensions/beautiful.py,sha256=eGfmJ72UQTVvevMCr80RoyYuCYxLaHkvAm1Kk2pkqc0,5331
|
|
18
|
+
absfuyu/extensions/dev/__init__.py,sha256=sr80dV4a2gktP3GhAYHQdFM5vDkXyTsSi74yCbnLc0E,6534
|
|
19
|
+
absfuyu/extensions/dev/password_hash.py,sha256=AO8VSW9s9VyrTCGgrN-HLqYIUWAYFSds6vLYrhH-ako,1826
|
|
20
|
+
absfuyu/extensions/dev/passwordlib.py,sha256=RvN-AOYann_K-OXVJOmtfTi38uYlcr7Gd2OnGe0I1og,6812
|
|
21
|
+
absfuyu/extensions/dev/project_starter.py,sha256=RkTHwMXdChB45d7rrDuDMzo3a34-P514JlOmYHHNads,1593
|
|
22
|
+
absfuyu/extensions/dev/shutdownizer.py,sha256=Vm9AUsUGyvRWRYAl4fp4CriSmixzBtV8ZGvqmNjdEvo,4027
|
|
23
|
+
absfuyu/extensions/extra/__init__.py,sha256=gUB8fIOz4V9xQxk689dMe7NFFu_r-CneCsi32DtjQAo,552
|
|
24
|
+
absfuyu/extensions/extra/data_analysis.py,sha256=CyAv-bLevoUDzpnULWP_b_I1_QGWK6DQa7pI6k8WBVQ,31695
|
|
25
|
+
absfuyu/fun/WGS.py,sha256=Aug9BsLTawBDkjdCQ3oqWAfGGeY6ZSBV1kENrTVnlUA,9461
|
|
26
|
+
absfuyu/fun/__init__.py,sha256=dkJ59Ci0_ncwfKUbY_HL862GwfDpKlcMKMMLbGXnbbU,6273
|
|
27
|
+
absfuyu/fun/tarot.py,sha256=ZHRuqclhSeTjolIqgl1D85e5QSwhxUSYWCqtQEyMHsA,2570
|
|
28
|
+
absfuyu/game/__init__.py,sha256=p3aHtyYgT1joM5Q596ycrU8vOpCahEOCkOQdJAH5iAU,4417
|
|
29
|
+
absfuyu/game/game_stat.py,sha256=4limsvYGw_t2PMZXrGfivouc4SDexFcc9f3SjXGVj_o,961
|
|
30
|
+
absfuyu/game/sudoku.py,sha256=RVjo3maXukxf6Og1MbALasN48uXNraMd2KcGhfgc9G8,10141
|
|
31
|
+
absfuyu/game/tictactoe.py,sha256=WeWbRTWPsKl_NXdxuL2h5f9Bu8zMvkRxwIf4VIeAiAA,9609
|
|
32
|
+
absfuyu/game/wordle.py,sha256=1RpgB8fBgcL_E2TgbTFXjZHtzthJQysCAl0fbK_LG5w,101336
|
|
33
|
+
absfuyu/general/__init__.py,sha256=6AJZ7Ul6l8MKaqEwRD2ktQUIBfhTPaDUYDQB7MUQ5rc,2481
|
|
34
|
+
absfuyu/general/content.py,sha256=7yhl-6Rhyp2geNpuKQkuhxor3EcyovW3COdiYsmjUDI,17441
|
|
35
|
+
absfuyu/general/data_extension.py,sha256=M4DTOTtjcVA-kFYOgdCbuy37QjaDcd_v22bb9FVPbdI,49017
|
|
36
|
+
absfuyu/general/generator.py,sha256=pozKlZgTqKxzwsKR6-tI8Lel0qTjTMubv4T3Zk7ifEQ,9691
|
|
37
|
+
absfuyu/general/human.py,sha256=lB7ZiY1RlLV3ZUgO93TluPNAK-UV4S6OS9X7iLYHRfM,9720
|
|
38
|
+
absfuyu/pkg_data/__init__.py,sha256=nqlQFF05sgnpPJYbac7gdUULPNy9PUVhW_KL8vGBqhQ,5000
|
|
39
|
+
absfuyu/pkg_data/chemistry.pkl,sha256=kYWNa_PVffoDnzT8b9Jvimmf_GZshPe1D-SnEKERsLo,4655
|
|
40
|
+
absfuyu/pkg_data/tarot.pkl,sha256=ssXTCC_BQgslO5F-3a9HivbxFQ6BioIe2E1frPVi2m0,56195
|
|
41
|
+
absfuyu/tools/__init__.py,sha256=VDmmMLEfiRyUWPVrPYc8JUEa5TXjLguKVnyI3YavFv0,118
|
|
42
|
+
absfuyu/tools/converter.py,sha256=9fbFpzxOmY44YDi_5S6CtcQPebeY-9wFeZ9057cJWeY,9925
|
|
43
|
+
absfuyu/tools/keygen.py,sha256=drj8OUDCXrLvcVf9_Shd5UMShm_mBTxa9Sg_BrAT5yM,7356
|
|
44
|
+
absfuyu/tools/obfuscator.py,sha256=c1HMEg40BY9XM_dHK1mokjHE9Sp5Vd083oFxvPnFrKA,8666
|
|
45
|
+
absfuyu/tools/stats.py,sha256=zZNK59qn0xqQlyw5CP3MP5WRMSxncdKZythqvgNR1lQ,5191
|
|
46
|
+
absfuyu/tools/web.py,sha256=Mb5RYj1Fu5eB-mYMusyrE2JG6_ZPEf8WT72Z8q6Ep74,1406
|
|
47
|
+
absfuyu/util/__init__.py,sha256=PMdzc23qt18hRBEc1vF5S2dStbLX8UqiIac_DH27Fac,3821
|
|
48
|
+
absfuyu/util/api.py,sha256=a7HvcNyRNgggUqyssYsggC8-1qofmVvFeRcOmLPQSqI,4427
|
|
49
|
+
absfuyu/util/json_method.py,sha256=7Qtdrf_Wh1qVswwHEdqGe0Zw3s_UYyBrpw8SGF7RVwI,2721
|
|
50
|
+
absfuyu/util/lunar.py,sha256=B7Xola5m8fNNAbqpsbLLJzAj8Z0HYT2EbNq-sYPPdl8,13804
|
|
51
|
+
absfuyu/util/path.py,sha256=_eeroXaHiJTzIyhX65b-gkMQ4tiHjKT_ZFHLFoHCzlo,16620
|
|
52
|
+
absfuyu/util/performance.py,sha256=vOSlMmKIT_LLM5Dey3ra-iLLEaW5SsBzIR5-dovzB0w,9142
|
|
53
|
+
absfuyu/util/pkl.py,sha256=ZZf6-PFC2uRGXqARNi0PGH3A0IXwMP0sYPWZJXENvak,1559
|
|
54
|
+
absfuyu/util/zipped.py,sha256=C0T2XRJcRPqoUiKBbViY2IgFI_47tdGMT9WXLxK1DeM,2570
|
|
55
|
+
absfuyu-3.3.3.dist-info/METADATA,sha256=bJRtoRzzpGmXxxA6hVzlR8EGf1n95UiTiRiNnks1M-8,3969
|
|
56
|
+
absfuyu-3.3.3.dist-info/WHEEL,sha256=xl5aZkiJYVTjhVaiADvIe6UeUVylGNomrxKZ0Zda1CE,87
|
|
57
|
+
absfuyu-3.3.3.dist-info/entry_points.txt,sha256=bW5CgJRTTWJ2Pywojo07sf-YucRPcnHzMmETh5avbX0,79
|
|
58
|
+
absfuyu-3.3.3.dist-info/licenses/LICENSE,sha256=_tQM-uZht2y-26_MHcIasBp8gtJ2YmvLOezIbhixrAA,1076
|
|
59
|
+
absfuyu-3.3.3.dist-info/RECORD,,
|