lamin_cli 1.0a1__py2.py3-none-any.whl → 1.0a5__py2.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.
- lamin_cli/__init__.py +1 -1
- lamin_cli/__main__.py +25 -7
- lamin_cli/_migration.py +1 -1
- {lamin_cli-1.0a1.dist-info → lamin_cli-1.0a5.dist-info}/METADATA +1 -1
- lamin_cli-1.0a5.dist-info/RECORD +12 -0
- lamin_cli-1.0a1.dist-info/RECORD +0 -12
- {lamin_cli-1.0a1.dist-info → lamin_cli-1.0a5.dist-info}/LICENSE +0 -0
- {lamin_cli-1.0a1.dist-info → lamin_cli-1.0a5.dist-info}/WHEEL +0 -0
- {lamin_cli-1.0a1.dist-info → lamin_cli-1.0a5.dist-info}/entry_points.txt +0 -0
lamin_cli/__init__.py
CHANGED
lamin_cli/__main__.py
CHANGED
|
@@ -6,6 +6,7 @@ import inspect
|
|
|
6
6
|
from importlib.metadata import PackageNotFoundError, version
|
|
7
7
|
from typing import Optional, Mapping
|
|
8
8
|
from functools import wraps
|
|
9
|
+
import warnings
|
|
9
10
|
|
|
10
11
|
# https://github.com/ewels/rich-click/issues/19
|
|
11
12
|
# Otherwise rich-click takes over the formatting.
|
|
@@ -135,18 +136,37 @@ def logout():
|
|
|
135
136
|
return logout_()
|
|
136
137
|
|
|
137
138
|
|
|
139
|
+
def schema_to_modules_callback(ctx, param, value):
|
|
140
|
+
if param.name == "schema" and value is not None:
|
|
141
|
+
warnings.warn(
|
|
142
|
+
"The --schema option is deprecated and will be removed in a future version."
|
|
143
|
+
" Please use --modules instead.",
|
|
144
|
+
DeprecationWarning,
|
|
145
|
+
)
|
|
146
|
+
return value
|
|
147
|
+
|
|
148
|
+
|
|
138
149
|
# fmt: off
|
|
139
150
|
@main.command()
|
|
140
151
|
@click.option("--storage", type=str, help="Local directory, s3://bucket_name, gs://bucket_name.") # noqa: E501
|
|
141
152
|
@click.option("--db", type=str, default=None, help="Postgres database connection URL, do not pass for SQLite.") # noqa: E501
|
|
142
|
-
@click.option("--
|
|
153
|
+
@click.option("--modules", type=str, default=None, help="Comma-separated string of modules.") # noqa: E501
|
|
143
154
|
@click.option("--name", type=str, default=None, help="The instance name.")
|
|
155
|
+
@click.option("--schema", type=str, default=None, help="[DEPRECATED] Use --modules instead.", callback=schema_to_modules_callback) # noqa: E501
|
|
144
156
|
# fmt: on
|
|
145
|
-
def init(
|
|
157
|
+
def init(
|
|
158
|
+
storage: str,
|
|
159
|
+
db: Optional[str],
|
|
160
|
+
modules: Optional[str],
|
|
161
|
+
name: Optional[str],
|
|
162
|
+
schema: Optional[str],
|
|
163
|
+
):
|
|
146
164
|
"""Init an instance."""
|
|
147
165
|
from lamindb_setup._init_instance import init as init_
|
|
148
166
|
|
|
149
|
-
|
|
167
|
+
modules = modules if modules is not None else schema
|
|
168
|
+
|
|
169
|
+
return init_(storage=storage, db=db, modules=modules, name=name)
|
|
150
170
|
|
|
151
171
|
|
|
152
172
|
# fmt: off
|
|
@@ -180,7 +200,7 @@ def disconnect():
|
|
|
180
200
|
|
|
181
201
|
|
|
182
202
|
@main.command()
|
|
183
|
-
@click.option("--schema", is_flag=True, help="View schema.")
|
|
203
|
+
@click.option("--schema", is_flag=True, help="View database schema.")
|
|
184
204
|
def info(schema: bool):
|
|
185
205
|
"""Show info about current instance."""
|
|
186
206
|
if schema:
|
|
@@ -265,9 +285,7 @@ def get(entity: str, uid: str = None, key: str = None, with_env: bool = False):
|
|
|
265
285
|
|
|
266
286
|
|
|
267
287
|
@main.command()
|
|
268
|
-
@click.argument(
|
|
269
|
-
"filepath", type=click.Path(exists=True, dir_okay=False, file_okay=True)
|
|
270
|
-
)
|
|
288
|
+
@click.argument("filepath", type=click.Path(exists=True, dir_okay=True, file_okay=True))
|
|
271
289
|
@click.option("--key", type=str, default=None)
|
|
272
290
|
@click.option("--description", type=str, default=None)
|
|
273
291
|
@click.option("--registry", type=str, default=None)
|
lamin_cli/_migration.py
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
lamin_cli/__init__.py,sha256=xQ-vwh6TYcH_M4iuwgYH8WhhgOTCWlFZGu-0xqkGsXM,40
|
|
2
|
+
lamin_cli/__main__.py,sha256=T2EnywSV4coW0CuXbohrY2WfU88dehAocTlDwvS8YqE,10533
|
|
3
|
+
lamin_cli/_cache.py,sha256=kW8rqlMwQeOngm9uq2gjzPVl3EBrwh6W2F2AvyBFABY,799
|
|
4
|
+
lamin_cli/_load.py,sha256=I2UGifZdIbbLm0JBOsuoR2CZeq5_uQR1BwIujDq8WfA,6694
|
|
5
|
+
lamin_cli/_migration.py,sha256=KH0aVRs72ej6ieyM49JaQw1SbT8z24H2heTFnWFcgy4,1071
|
|
6
|
+
lamin_cli/_save.py,sha256=PrvZSL02jU1BWLUEVTTQsn2MLi942RKOyN3Qd3qfl6s,5677
|
|
7
|
+
lamin_cli/_settings.py,sha256=iS37mcQUHKRWxi2sHnAojEI6sWk3w232qwG-GeY2_Qc,1141
|
|
8
|
+
lamin_cli-1.0a5.dist-info/entry_points.txt,sha256=Qms85i9cZPlu-U7RnVZhFsF7vJ9gaLZUFkCjcGcXTpg,49
|
|
9
|
+
lamin_cli-1.0a5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
10
|
+
lamin_cli-1.0a5.dist-info/WHEEL,sha256=ssQ84EZ5gH1pCOujd3iW7HClo_O_aDaClUbX4B8bjKY,100
|
|
11
|
+
lamin_cli-1.0a5.dist-info/METADATA,sha256=cLzAMN0WoMGHmsWMOIH-ByOdCK83qd1jJcWubPNYmNQ,337
|
|
12
|
+
lamin_cli-1.0a5.dist-info/RECORD,,
|
lamin_cli-1.0a1.dist-info/RECORD
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
lamin_cli/__init__.py,sha256=ygApcHBvEoSGZBbdy7cdCV_MnVUaYbGis_FDxgtNxm4,40
|
|
2
|
-
lamin_cli/__main__.py,sha256=CnwhcWeSJwLdq4esnewNKc6Z-T4AuZ8EMDmILfpBZF0,9946
|
|
3
|
-
lamin_cli/_cache.py,sha256=kW8rqlMwQeOngm9uq2gjzPVl3EBrwh6W2F2AvyBFABY,799
|
|
4
|
-
lamin_cli/_load.py,sha256=I2UGifZdIbbLm0JBOsuoR2CZeq5_uQR1BwIujDq8WfA,6694
|
|
5
|
-
lamin_cli/_migration.py,sha256=xTbad6aDUwuK0QvWCmDW3f8-xaqwisS-Cqf-LbD1WRI,1071
|
|
6
|
-
lamin_cli/_save.py,sha256=PrvZSL02jU1BWLUEVTTQsn2MLi942RKOyN3Qd3qfl6s,5677
|
|
7
|
-
lamin_cli/_settings.py,sha256=iS37mcQUHKRWxi2sHnAojEI6sWk3w232qwG-GeY2_Qc,1141
|
|
8
|
-
lamin_cli-1.0a1.dist-info/entry_points.txt,sha256=Qms85i9cZPlu-U7RnVZhFsF7vJ9gaLZUFkCjcGcXTpg,49
|
|
9
|
-
lamin_cli-1.0a1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
10
|
-
lamin_cli-1.0a1.dist-info/WHEEL,sha256=ssQ84EZ5gH1pCOujd3iW7HClo_O_aDaClUbX4B8bjKY,100
|
|
11
|
-
lamin_cli-1.0a1.dist-info/METADATA,sha256=4t0BVXkfQyWzahzefrlFl2vG0MRyYmxfNoT6rvQdcJg,337
|
|
12
|
-
lamin_cli-1.0a1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|