sdv-installer 0.3.1.dev0__tar.gz → 0.4.1__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.
- {sdv_installer-0.3.1.dev0/sdv_installer.egg-info → sdv_installer-0.4.1}/PKG-INFO +1 -1
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/pyproject.toml +1 -1
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/__init__.py +1 -1
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/cli/__main__.py +10 -1
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/installation/installer.py +32 -9
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1/sdv_installer.egg-info}/PKG-INFO +1 -1
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/LICENSE +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/README.md +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/authentication/__init__.py +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/authentication/authentication.py +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/cli/__init__.py +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/config.py +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/constants.py +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/installation/__init__.py +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/utils/__init__.py +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/utils/console_utils.py +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/utils/data_storage.py +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/utils/package_utils.py +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/utils/request_error_handling.py +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/utils/system_requirements.py +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer.egg-info/SOURCES.txt +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer.egg-info/dependency_links.txt +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer.egg-info/entry_points.txt +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer.egg-info/requires.txt +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer.egg-info/top_level.txt +0 -0
- {sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/setup.cfg +0 -0
|
@@ -165,7 +165,7 @@ max-doc-length = 100
|
|
|
165
165
|
max-line-length = 100
|
|
166
166
|
|
|
167
167
|
[tool.bumpversion]
|
|
168
|
-
current_version = "0.
|
|
168
|
+
current_version = "0.4.1"
|
|
169
169
|
parse = '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?'
|
|
170
170
|
serialize = [
|
|
171
171
|
'{major}.{minor}.{patch}.{release}{candidate}',
|
|
@@ -14,11 +14,20 @@ from sdv_installer.installation import (
|
|
|
14
14
|
from sdv_installer.utils.system_requirements import print_check_results
|
|
15
15
|
|
|
16
16
|
# Adding a new version here to avoid circular imports
|
|
17
|
-
SDV_INSTALLER_VERSION = '0.
|
|
17
|
+
SDV_INSTALLER_VERSION = '0.4.1'
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _validate_install_args(args):
|
|
21
|
+
if args.upgrade and args.version is not None:
|
|
22
|
+
raise ValueError(
|
|
23
|
+
"The '--upgrade' flag cannot be used in combination with the '--version' flag. Use "
|
|
24
|
+
"'--upgrade' to upgrade to the latest version and '--version' for a specific version."
|
|
25
|
+
)
|
|
18
26
|
|
|
19
27
|
|
|
20
28
|
def install_action(args):
|
|
21
29
|
"""Install the `SDV-Enterprise` packages."""
|
|
30
|
+
_validate_install_args(args)
|
|
22
31
|
if args.folder:
|
|
23
32
|
install_packages_from_folder(
|
|
24
33
|
folder=args.folder,
|
|
@@ -318,27 +318,48 @@ def _get_accessible_packages(username, license_key):
|
|
|
318
318
|
return package_to_product_type
|
|
319
319
|
|
|
320
320
|
|
|
321
|
-
def _get_packages(
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
321
|
+
def _get_packages(
|
|
322
|
+
username: str,
|
|
323
|
+
license_key: str,
|
|
324
|
+
package: Optional[str] = None,
|
|
325
|
+
options: Optional[Union[str, list[str]]] = None,
|
|
326
|
+
accessible_packages: Optional[Dict[str, str]] = None,
|
|
327
|
+
):
|
|
328
|
+
"""Retrieve a list of available packages to install.
|
|
329
|
+
|
|
330
|
+
Args:
|
|
331
|
+
username:
|
|
332
|
+
The user's username in the License Key Service. This is usually their email.
|
|
333
|
+
license_key:
|
|
334
|
+
The license key for that user.
|
|
335
|
+
package:
|
|
336
|
+
The name of the package to install. If this is not provided, all packages the user
|
|
337
|
+
has access to will be returned.
|
|
338
|
+
options:
|
|
339
|
+
Either an optional dependency or a list of optional dependencies.
|
|
340
|
+
accessible_packages:
|
|
341
|
+
A dictionary mapping package names the user can access to the product type.
|
|
342
|
+
"""
|
|
343
|
+
if accessible_packages is None:
|
|
344
|
+
accessible_packages = _get_accessible_packages(username, license_key)
|
|
345
|
+
if not accessible_packages:
|
|
325
346
|
return
|
|
326
347
|
|
|
327
|
-
if package in
|
|
348
|
+
if package in accessible_packages and options:
|
|
328
349
|
options = options if isinstance(options, list) else [options]
|
|
329
350
|
bundle_available_packages = {
|
|
330
351
|
f'{package}[{option}]': ProductType.BUNDLE.value for option in options
|
|
331
352
|
}
|
|
332
353
|
return bundle_available_packages
|
|
333
354
|
|
|
334
|
-
elif package and package not in
|
|
355
|
+
elif package and package not in accessible_packages:
|
|
335
356
|
print_message(f'Invalid package {package} or no access to the given package.')
|
|
336
357
|
return
|
|
337
358
|
|
|
338
|
-
if package and package in
|
|
339
|
-
return {package:
|
|
359
|
+
if package and package in accessible_packages:
|
|
360
|
+
return {package: accessible_packages[package]}
|
|
340
361
|
|
|
341
|
-
return
|
|
362
|
+
return accessible_packages
|
|
342
363
|
|
|
343
364
|
|
|
344
365
|
def _create_user_data_dir(data_dir, error_message=None):
|
|
@@ -376,6 +397,7 @@ def _save_auth_file(username, license_key, folder=None):
|
|
|
376
397
|
config.API_AUTH_FILE,
|
|
377
398
|
data=json.dumps({'username': username, 'license_key': license_key}),
|
|
378
399
|
headers=config.HEADERS,
|
|
400
|
+
timeout=config.TIMEOUT,
|
|
379
401
|
)
|
|
380
402
|
response.raise_for_status()
|
|
381
403
|
except requests.HTTPError as e:
|
|
@@ -441,6 +463,7 @@ def install_packages(
|
|
|
441
463
|
license_key=license_key,
|
|
442
464
|
package=package,
|
|
443
465
|
options=options,
|
|
466
|
+
accessible_packages=all_sdv_enterprise_related_pkgs,
|
|
444
467
|
)
|
|
445
468
|
if not user_requested_packages:
|
|
446
469
|
return
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/authentication/authentication.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer/utils/request_error_handling.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sdv_installer-0.3.1.dev0 → sdv_installer-0.4.1}/sdv_installer.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|