orionis 0.671.0__py3-none-any.whl → 0.673.0__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.
- orionis/console/commands/__publisher__.py +12 -1
- orionis/console/core/reactor.py +44 -37
- orionis/metadata/framework.py +1 -1
- {orionis-0.671.0.dist-info → orionis-0.673.0.dist-info}/METADATA +1 -1
- {orionis-0.671.0.dist-info → orionis-0.673.0.dist-info}/RECORD +8 -8
- {orionis-0.671.0.dist-info → orionis-0.673.0.dist-info}/WHEEL +0 -0
- {orionis-0.671.0.dist-info → orionis-0.673.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.671.0.dist-info → orionis-0.673.0.dist-info}/top_level.txt +0 -0
|
@@ -6,6 +6,7 @@ import subprocess
|
|
|
6
6
|
import sys
|
|
7
7
|
import time
|
|
8
8
|
from pathlib import Path
|
|
9
|
+
from typing import Optional
|
|
9
10
|
from rich.console import Console
|
|
10
11
|
from rich.panel import Panel
|
|
11
12
|
from orionis.console.base.command import BaseCommand
|
|
@@ -95,6 +96,9 @@ class PublisherCommand(BaseCommand):
|
|
|
95
96
|
# Calculate the width for console panels (3/4 of the console width)
|
|
96
97
|
self.__with_console = (self.__console.width // 4) * 3
|
|
97
98
|
|
|
99
|
+
# Retrieve the PyPI token from environment variables
|
|
100
|
+
self.__token: Optional[str] = None
|
|
101
|
+
|
|
98
102
|
def __bumpMinorVersion(self):
|
|
99
103
|
"""
|
|
100
104
|
Increment the minor version number in the file where the VERSION constant is defined.
|
|
@@ -373,7 +377,7 @@ class PublisherCommand(BaseCommand):
|
|
|
373
377
|
"""
|
|
374
378
|
|
|
375
379
|
# Get the PyPI token from environment variables
|
|
376
|
-
token =
|
|
380
|
+
token = self.__token
|
|
377
381
|
|
|
378
382
|
# Check if the PyPI token is available
|
|
379
383
|
if not token:
|
|
@@ -535,6 +539,13 @@ class PublisherCommand(BaseCommand):
|
|
|
535
539
|
"""
|
|
536
540
|
try:
|
|
537
541
|
|
|
542
|
+
# Retrieve the PyPI token from environment variables
|
|
543
|
+
self.__token = os.getenv("PYPI_TOKEN").strip()
|
|
544
|
+
|
|
545
|
+
# Ensure the PyPI token is available
|
|
546
|
+
if not self.__token:
|
|
547
|
+
raise ValueError("PyPI token not found in environment variables.")
|
|
548
|
+
|
|
538
549
|
# Execute test suite
|
|
539
550
|
response: dict = reactor.call("test")
|
|
540
551
|
|
orionis/console/core/reactor.py
CHANGED
|
@@ -565,51 +565,58 @@ class Reactor(IReactor):
|
|
|
565
565
|
If the 'options' method does not return a list or contains non-CLIArgument instances.
|
|
566
566
|
"""
|
|
567
567
|
|
|
568
|
-
|
|
569
|
-
instance = self.__app.make(obj)
|
|
570
|
-
options: List[CLIArgument] = self.__app.call(instance, 'options')
|
|
571
|
-
|
|
572
|
-
# Validate that options is a list
|
|
573
|
-
if not isinstance(options, list):
|
|
574
|
-
raise CLIOrionisTypeError(
|
|
575
|
-
f"Command class {obj.__name__} 'options' must return a list."
|
|
576
|
-
)
|
|
568
|
+
try:
|
|
577
569
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
570
|
+
# Instantiate the command and retrieve its options
|
|
571
|
+
instance = self.__app.make(obj)
|
|
572
|
+
options: List[CLIArgument] = self.__app.call(instance, 'options')
|
|
581
573
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
if not isinstance(arg, CLIArgument):
|
|
574
|
+
# Validate that options is a list
|
|
575
|
+
if not isinstance(options, list):
|
|
585
576
|
raise CLIOrionisTypeError(
|
|
586
|
-
f"Command class {obj.__name__} 'options' must
|
|
587
|
-
f"found '{type(arg).__name__}' at index {idx}."
|
|
577
|
+
f"Command class {obj.__name__} 'options' must return a list."
|
|
588
578
|
)
|
|
589
579
|
|
|
580
|
+
# Return None if there are no arguments
|
|
581
|
+
if not options:
|
|
582
|
+
return None
|
|
583
|
+
|
|
584
|
+
# Validate all items are CLIArgument instances
|
|
585
|
+
for idx, arg in enumerate(options):
|
|
586
|
+
if not isinstance(arg, CLIArgument):
|
|
587
|
+
raise CLIOrionisTypeError(
|
|
588
|
+
f"Command class {obj.__name__} 'options' must contain only CLIArgument instances, "
|
|
589
|
+
f"found '{type(arg).__name__}' at index {idx}."
|
|
590
|
+
)
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
# Get the Signature attribute from the command class
|
|
594
|
+
rf_concrete = ReflectionConcrete(obj)
|
|
595
|
+
signature = rf_concrete.getAttribute('signature', '<unknown>')
|
|
596
|
+
description = rf_concrete.getAttribute('description', '')
|
|
597
|
+
|
|
598
|
+
# Build the ArgumentParser
|
|
599
|
+
arg_parser = argparse.ArgumentParser(
|
|
600
|
+
usage=f"python -B reactor {signature} [options]",
|
|
601
|
+
description=f"Command [{signature}] : {description}",
|
|
602
|
+
formatter_class=argparse.RawTextHelpFormatter,
|
|
603
|
+
add_help=True,
|
|
604
|
+
allow_abbrev=False,
|
|
605
|
+
exit_on_error=True,
|
|
606
|
+
prog=signature
|
|
607
|
+
)
|
|
608
|
+
|
|
609
|
+
# Add each CLIArgument to the ArgumentParser
|
|
610
|
+
for arg in options:
|
|
611
|
+
arg.addToParser(arg_parser)
|
|
590
612
|
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
signature = rf_concrete.getAttribute('signature', '<unknown>')
|
|
594
|
-
description = rf_concrete.getAttribute('description', '')
|
|
595
|
-
|
|
596
|
-
# Build the ArgumentParser
|
|
597
|
-
arg_parser = argparse.ArgumentParser(
|
|
598
|
-
usage=f"python -B reactor {signature} [options]",
|
|
599
|
-
description=f"Command [{signature}] : {description}",
|
|
600
|
-
formatter_class=argparse.RawTextHelpFormatter,
|
|
601
|
-
add_help=True,
|
|
602
|
-
allow_abbrev=False,
|
|
603
|
-
exit_on_error=True,
|
|
604
|
-
prog=signature
|
|
605
|
-
)
|
|
613
|
+
# Return the constructed ArgumentParser
|
|
614
|
+
return arg_parser
|
|
606
615
|
|
|
607
|
-
|
|
608
|
-
for arg in options:
|
|
609
|
-
arg.addToParser(arg_parser)
|
|
616
|
+
except Exception as e:
|
|
610
617
|
|
|
611
|
-
|
|
612
|
-
|
|
618
|
+
# Raise a runtime error if any exception occurs during argument processing
|
|
619
|
+
raise CLIOrionisRuntimeError(e) from e
|
|
613
620
|
|
|
614
621
|
def __parseArgs(
|
|
615
622
|
self,
|
orionis/metadata/framework.py
CHANGED
|
@@ -8,7 +8,7 @@ orionis/console/base/command.py,sha256=tAO_EVy1aNWneNSKYYMAf9yDTfbvHAqSJnZZ6pOR4
|
|
|
8
8
|
orionis/console/base/scheduler.py,sha256=JoZdtyrVJiNzBoVEWUovHscqBxqw_fPPwaENIQc4Zp4,7644
|
|
9
9
|
orionis/console/base/scheduler_event_listener.py,sha256=X2mZBAYLBCtLOH7QSrCEaLeJ5m8Hq5UtGxaWRRvWbfo,4421
|
|
10
10
|
orionis/console/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
orionis/console/commands/__publisher__.py,sha256=
|
|
11
|
+
orionis/console/commands/__publisher__.py,sha256=TS2WGZoWx7YX8CP7ixKB5lHc_1r-bBDNB8OkkWR9lzc,21647
|
|
12
12
|
orionis/console/commands/cache_clear.py,sha256=iwdMdRLw8BAGkR-OcBB3JD9pOidC3jWT-W-DUrENywQ,3048
|
|
13
13
|
orionis/console/commands/help.py,sha256=VFIn3UqQm4pxwjfSQohVwKNpc7F-6XRcwSZQwDSLEaU,3739
|
|
14
14
|
orionis/console/commands/log_clear.py,sha256=OI1j_myCYUOMI-SfnN-NH-6BYzzWKXOKIEb55vFTXq4,4045
|
|
@@ -32,7 +32,7 @@ orionis/console/contracts/reactor.py,sha256=iT6ShoCutAWEeJzOf_PK7CGXi9TgrOD5tewH
|
|
|
32
32
|
orionis/console/contracts/schedule.py,sha256=xtXgp4BPhvhg3YSM4mrIdbyoBdr4OJBi1gBM_kJN5UQ,13694
|
|
33
33
|
orionis/console/contracts/schedule_event_listener.py,sha256=h06qsBxuEMD3KLSyu0JXdUDHlQW19BX9lA09Qrh2QXg,3818
|
|
34
34
|
orionis/console/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
-
orionis/console/core/reactor.py,sha256=
|
|
35
|
+
orionis/console/core/reactor.py,sha256=qctLns-f5eB9Air7Qi4hvX5KB5A7SsHeV8M5zYJEiPA,44286
|
|
36
36
|
orionis/console/debug/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
37
|
orionis/console/debug/dumper.py,sha256=vbmP_GlrzBj0KDjiQl4iDudPRe6V0W5r5UA8i3h9_c4,6555
|
|
38
38
|
orionis/console/dynamic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -206,7 +206,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=IrPQJwvQVLRm5Qnz0Cxon4
|
|
|
206
206
|
orionis/foundation/providers/testing_provider.py,sha256=eI1p2lUlxl25b5Z487O4nmqLE31CTDb4c3Q21xFadkE,1615
|
|
207
207
|
orionis/foundation/providers/workers_provider.py,sha256=GdHENYV_yGyqmHJHn0DCyWmWId5xWjD48e6Zq2PGCWY,1674
|
|
208
208
|
orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
209
|
-
orionis/metadata/framework.py,sha256=
|
|
209
|
+
orionis/metadata/framework.py,sha256=OsiC3LCzkKddiJ--SKGdF6eg2fwkSe-z5Temxx1nMfA,4089
|
|
210
210
|
orionis/metadata/package.py,sha256=s1JeGJPwdVh4jO3IOfmpwMuJ_oX6Vf9NL7jgPEQNf5Y,16050
|
|
211
211
|
orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
212
212
|
orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -393,8 +393,8 @@ orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnI
|
|
|
393
393
|
orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
394
394
|
orionis/test/view/render.py,sha256=arysoswhkV2vUd2aVMZRPpmH317jaWbgjDpQ_AWQ5AE,5663
|
|
395
395
|
orionis/test/view/report.stub,sha256=QLqqCdRoENr3ECiritRB3DO_MOjRQvgBh5jxZ3Hs1r0,28189
|
|
396
|
-
orionis-0.
|
|
397
|
-
orionis-0.
|
|
398
|
-
orionis-0.
|
|
399
|
-
orionis-0.
|
|
400
|
-
orionis-0.
|
|
396
|
+
orionis-0.673.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
|
|
397
|
+
orionis-0.673.0.dist-info/METADATA,sha256=K1Z60dT6hyacInmJ4nrPz3oIjk1U1ARxvuT0wdJfxI8,4772
|
|
398
|
+
orionis-0.673.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
399
|
+
orionis-0.673.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
|
|
400
|
+
orionis-0.673.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|