divbase-cli 0.1.0a1__tar.gz → 0.1.0a3__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.
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/.gitignore +7 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/PKG-INFO +2 -2
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/pyproject.toml +1 -1
- divbase_cli-0.1.0a3/src/divbase_cli/__init__.py +1 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/cli_commands/auth_cli.py +2 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/cli_commands/dimensions_cli.py +2 -2
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/cli_commands/file_cli.py +7 -7
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/cli_commands/user_config_cli.py +14 -7
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/user_auth.py +2 -2
- divbase_cli-0.1.0a1/src/divbase_cli/__init__.py +0 -1
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/README.md +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/cli_commands/__init__.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/cli_commands/query_cli.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/cli_commands/shared_args_options.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/cli_commands/task_history_cli.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/cli_commands/version_cli.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/cli_config.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/cli_exceptions.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/config_resolver.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/display_task_history.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/divbase_cli.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/retries.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/services/__init__.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/services/announcements.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/services/pre_signed_urls.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/services/project_versions.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/services/s3_files.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/user_config.py +0 -0
- {divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/utils.py +0 -0
|
@@ -34,6 +34,12 @@ split_scaffold_files.txt
|
|
|
34
34
|
scripts/benchmarking/*.yaml
|
|
35
35
|
scripts/benchmarking/results
|
|
36
36
|
|
|
37
|
+
# pytest-cov generate files
|
|
38
|
+
.coverage
|
|
39
|
+
.coverage.*
|
|
40
|
+
htmlcov/
|
|
41
|
+
docker/coverage-data/
|
|
42
|
+
|
|
37
43
|
#MacOS artifacts
|
|
38
44
|
.DS_Store
|
|
39
45
|
|
|
@@ -41,6 +47,7 @@ scripts/benchmarking/results
|
|
|
41
47
|
.cache/
|
|
42
48
|
# mkdocs auto generated files
|
|
43
49
|
docs/cli/_auto_generated/*.md
|
|
50
|
+
docs/releases/index.md
|
|
44
51
|
|
|
45
52
|
# pypi
|
|
46
53
|
dist/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: divbase-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a3
|
|
4
4
|
Summary: Command Line Interface for Divbase
|
|
5
5
|
Project-URL: Homepage, https://divbase.scilifelab-2-prod.sys.kth.se
|
|
6
6
|
Project-URL: Documentation, https://scilifelabdatacentre.github.io/divbase
|
|
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.14
|
|
20
20
|
Requires-Python: >=3.12
|
|
21
|
-
Requires-Dist: divbase-lib==0.1.
|
|
21
|
+
Requires-Dist: divbase-lib==0.1.0a3
|
|
22
22
|
Requires-Dist: keyring>=25.7.0
|
|
23
23
|
Requires-Dist: typer==0.24.1
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0a3"
|
|
@@ -32,7 +32,7 @@ dimensions_app = typer.Typer(
|
|
|
32
32
|
def update_dimensions_index(
|
|
33
33
|
project: str | None = PROJECT_NAME_OPTION,
|
|
34
34
|
) -> None:
|
|
35
|
-
"""Calculate and add the dimensions of
|
|
35
|
+
"""Calculate and add the dimensions of all VCF files in the project to the dimensions index in the project."""
|
|
36
36
|
|
|
37
37
|
project_config = resolve_project(project_name=project)
|
|
38
38
|
|
|
@@ -279,7 +279,7 @@ def create_metadata_template_with_project_samples_names(
|
|
|
279
279
|
project: str | None = PROJECT_NAME_OPTION,
|
|
280
280
|
) -> None:
|
|
281
281
|
"""
|
|
282
|
-
Create a template sample metadata file (TSV format) pre-filled with the sample names from the project's VCF files based on the information stored in the project's VCF dimensions cache. Tip: run 'divbase-cli dimensions update' first to ensure that the VCF dimensions
|
|
282
|
+
Create a template sample metadata file (TSV format) pre-filled with the sample names from the project's VCF files based on the information stored in the project's VCF dimensions cache. Tip: run 'divbase-cli dimensions update' first to ensure that the VCF dimensions are up-to-date.
|
|
283
283
|
"""
|
|
284
284
|
project_config = resolve_project(project_name=project)
|
|
285
285
|
logged_in_url = ensure_logged_in(desired_url=project_config.divbase_url)
|
|
@@ -48,7 +48,7 @@ DISABLE_VERIFY_CHECKSUMS_OPTION = typer.Option(
|
|
|
48
48
|
"--disable-verify-checksums",
|
|
49
49
|
"-nc",
|
|
50
50
|
help="Turn off checksum verification which is on by default. "
|
|
51
|
-
"Checksum verification means all downloaded files are verified against their MD5 checksums."
|
|
51
|
+
"Checksum verification means all downloaded files are verified against their MD5 checksums. "
|
|
52
52
|
"It is recommended to leave checksum verification enabled unless you have a specific reason to disable it.",
|
|
53
53
|
)
|
|
54
54
|
PROJECT_VERSION_OPTION = typer.Option(
|
|
@@ -89,7 +89,7 @@ def list_files(
|
|
|
89
89
|
project: str | None = PROJECT_NAME_OPTION,
|
|
90
90
|
):
|
|
91
91
|
"""
|
|
92
|
-
|
|
92
|
+
List all currently available files in the project's DivBase store.
|
|
93
93
|
|
|
94
94
|
You can optionally filter the listed files by providing a prefix.
|
|
95
95
|
By default, DivBase query results files are hidden from the listing. Use the --include-results-files option to include them.
|
|
@@ -219,7 +219,7 @@ def download_files(
|
|
|
219
219
|
files: list[str] = typer.Argument(
|
|
220
220
|
None, help="Space separated list of files/objects to download from the project's store on DivBase."
|
|
221
221
|
),
|
|
222
|
-
file_list: Path | None = typer.Option(None, "--file-list", help="Text file with list of files to
|
|
222
|
+
file_list: Path | None = typer.Option(None, "--file-list", help="Text file with list of files to download."),
|
|
223
223
|
download_dir: str = DOWNLOAD_DIR_OPTION,
|
|
224
224
|
dry_run: bool = DRY_RUN_OPTION,
|
|
225
225
|
disable_verify_checksums: bool = DISABLE_VERIFY_CHECKSUMS_OPTION,
|
|
@@ -235,7 +235,7 @@ def download_files(
|
|
|
235
235
|
|
|
236
236
|
To download the latest version of a file, just provide its name. "file1" "file2" etc.
|
|
237
237
|
To download a specific/older version of a file, use the format: "file_name:version_id"
|
|
238
|
-
You can get a file's version id using the 'divbase-cli
|
|
238
|
+
You can get a file's version id using the 'divbase-cli files info [FILE_NAME]' command.
|
|
239
239
|
You can mix and match latest and specific versions in the same command.
|
|
240
240
|
E.g. to download the latest version of file1 and version "3xcdsdsdiw829x"
|
|
241
241
|
of file2: 'divbase-cli files download file1 file2:3xcdsdsdiw829x'
|
|
@@ -385,7 +385,7 @@ def stream_file(
|
|
|
385
385
|
default=None,
|
|
386
386
|
help="Specify this if you want to look at an older/specific version of the file. "
|
|
387
387
|
"If not provided, the latest version of the file is used. "
|
|
388
|
-
"To get a file's version ids, use the 'divbase-cli
|
|
388
|
+
"To get a file's version ids, use the 'divbase-cli files info [FILE_NAME]' command.",
|
|
389
389
|
),
|
|
390
390
|
project: str | None = PROJECT_NAME_OPTION,
|
|
391
391
|
):
|
|
@@ -483,7 +483,7 @@ def upload_files(
|
|
|
483
483
|
@file_app.command("rm")
|
|
484
484
|
def remove_files(
|
|
485
485
|
files: list[str] | None = typer.Argument(
|
|
486
|
-
None, help="Space
|
|
486
|
+
None, help="Space separated list of files/objects in the project's store on DivBase to delete."
|
|
487
487
|
),
|
|
488
488
|
file_list: Path | None = typer.Option(None, "--file-list", help="Text file with list of files to delete."),
|
|
489
489
|
dry_run: bool = typer.Option(
|
|
@@ -528,7 +528,7 @@ def remove_files(
|
|
|
528
528
|
@file_app.command("restore")
|
|
529
529
|
def restore_soft_deleted_files(
|
|
530
530
|
files: list[str] | None = typer.Argument(
|
|
531
|
-
None, help="Space
|
|
531
|
+
None, help="Space separated list of files/objects in the project's store on DivBase to restore."
|
|
532
532
|
),
|
|
533
533
|
file_list: Path | None = typer.Option(None, "--file-list", help="Text file with list of files to restore."),
|
|
534
534
|
project: str | None = PROJECT_NAME_OPTION,
|
|
@@ -66,9 +66,13 @@ def remove_project_command(
|
|
|
66
66
|
|
|
67
67
|
@config_app.command("set-default")
|
|
68
68
|
def set_default_project_command(
|
|
69
|
-
name: str = typer.Argument(..., help="Name of the project to
|
|
69
|
+
name: str = typer.Argument(..., help="Name of the project to set as the default."),
|
|
70
70
|
):
|
|
71
|
-
"""
|
|
71
|
+
"""
|
|
72
|
+
Set the default project to use in all divbase-cli commands.
|
|
73
|
+
|
|
74
|
+
The project must already be added to your config file using the 'add' command.
|
|
75
|
+
"""
|
|
72
76
|
config = load_user_config()
|
|
73
77
|
default_project_name = config.set_default_project(name=name)
|
|
74
78
|
print(f"Default project is now set to '{default_project_name}'.")
|
|
@@ -89,13 +93,16 @@ def show_default_project_command() -> None:
|
|
|
89
93
|
def set_default_dload_dir_command(
|
|
90
94
|
download_dir: str = typer.Argument(
|
|
91
95
|
...,
|
|
92
|
-
help="
|
|
93
|
-
By default files are downloaded to the current working directory.
|
|
94
|
-
|
|
95
|
-
You can use '.' to refer to the directory you run the command from.""",
|
|
96
|
+
help="Set the default directory to download files to. "
|
|
97
|
+
"By default files are downloaded to the current working directory. "
|
|
98
|
+
"Do not use a relative path. To use the current working directory (where each command is run from), use '.' as the argument.",
|
|
96
99
|
),
|
|
97
100
|
):
|
|
98
|
-
"""
|
|
101
|
+
"""
|
|
102
|
+
Set the default download directory in your user configuration file.
|
|
103
|
+
|
|
104
|
+
This is by default unset, meaning files will be downloaded to the current working directory.
|
|
105
|
+
"""
|
|
99
106
|
config = load_user_config()
|
|
100
107
|
dload_dir = config.set_default_download_dir(download_dir=download_dir)
|
|
101
108
|
if dload_dir == ".":
|
|
@@ -21,7 +21,7 @@ import httpx
|
|
|
21
21
|
import keyring
|
|
22
22
|
import stamina
|
|
23
23
|
import yaml
|
|
24
|
-
from keyring.errors import KeyringError
|
|
24
|
+
from keyring.errors import KeyringError
|
|
25
25
|
from pydantic import SecretStr
|
|
26
26
|
|
|
27
27
|
from divbase_cli import __version__ as cli_version
|
|
@@ -85,7 +85,7 @@ class TokenData:
|
|
|
85
85
|
|
|
86
86
|
def _delete_stored_jwts(token_path: Path) -> None:
|
|
87
87
|
"""Attempt to delete user JWTs from both the keyring and the fallback file."""
|
|
88
|
-
with contextlib.suppress(
|
|
88
|
+
with contextlib.suppress(KeyringError):
|
|
89
89
|
keyring.delete_password(service_name=cli_settings.KEYRING_SERVICE, username=cli_settings.KEYRING_USERNAME)
|
|
90
90
|
token_path.unlink(missing_ok=True)
|
|
91
91
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.0a1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/cli_commands/shared_args_options.py
RENAMED
|
File without changes
|
{divbase_cli-0.1.0a1 → divbase_cli-0.1.0a3}/src/divbase_cli/cli_commands/task_history_cli.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|