openbayes-cli 0.4.5__tar.gz → 0.4.6__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.
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/PKG-INFO +1 -1
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/root.py +2 -2
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/utils.py +20 -4
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/pyproject.toml +1 -1
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/README.md +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/__init__.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/client/__init__.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/client/base.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/client/dataset_version_client.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/client/gear_client.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/client/job_run_client.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/client/job_upload_client.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/client/org_client.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/client/resource_client.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/client/runtime_client.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/client/ssh_client.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/client/status_client.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/client/user_client.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/commands/__init__.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/commands/gear.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/commands/org.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/commands/ssh.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/error.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/model/__init__.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/model/dataset_version.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/model/file/__init__.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/model/file/data_bindings.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/model/file/openbayes_data.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/model/file/openbayes_gear.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/model/file/openbayes_ignore.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/model/file/openbayes_yaml.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/model/file/settings.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/model/party.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/model/resource.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/model/runtime.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/templates/openbayes_zh-Hans.yaml +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/templates/openbayesignore.yaml +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/__init__.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/archive_usecase.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/auth_usecase.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/dataset_version_usecase.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/disk_usecase.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/gear_download_usecese.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/gear_logs_usecase.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/gear_open_usecase.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/gear_run_usecase.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/gear_upload_usecase.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/gear_usecase.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/openbayes_data_usecase.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/org_usecase.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/resource_usecase.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/runtime_usecase.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/ssh_usecase.py +0 -0
- {openbayes_cli-0.4.5 → openbayes_cli-0.4.6}/bayes/usercases/switch_usercase.py +0 -0
|
@@ -166,5 +166,5 @@ def status(ctx: typer.Context):
|
|
|
166
166
|
|
|
167
167
|
@app.command()
|
|
168
168
|
def version(ctx: typer.Context):
|
|
169
|
-
version_number = Utils.
|
|
170
|
-
print(f"openbayes 的版本号为:{version_number}")
|
|
169
|
+
version_number = Utils.get_version()
|
|
170
|
+
print(f"openbayes 的版本号为: {version_number}")
|
|
@@ -138,10 +138,26 @@ class Utils:
|
|
|
138
138
|
return base_url + new_id
|
|
139
139
|
|
|
140
140
|
@staticmethod
|
|
141
|
-
def
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
def get_version():
|
|
142
|
+
try:
|
|
143
|
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
144
|
+
project_root = os.path.dirname(current_dir)
|
|
145
|
+
pyproject_path = os.path.join(project_root, 'pyproject.toml')
|
|
146
|
+
|
|
147
|
+
with open(pyproject_path, 'r') as f:
|
|
148
|
+
pyproject_data = toml.load(f)
|
|
149
|
+
|
|
150
|
+
version = pyproject_data['tool']['poetry']['version']
|
|
151
|
+
return version
|
|
152
|
+
except FileNotFoundError:
|
|
153
|
+
print("Error: pyproject.toml not found", file=sys.stderr)
|
|
154
|
+
return "Unknown"
|
|
155
|
+
except KeyError:
|
|
156
|
+
print("Error: Version information not found in pyproject.toml", file=sys.stderr)
|
|
157
|
+
return "Unknown"
|
|
158
|
+
except Exception as e:
|
|
159
|
+
print(f"Error getting version: {e}", file=sys.stderr)
|
|
160
|
+
return "Unknown"
|
|
145
161
|
|
|
146
162
|
|
|
147
163
|
def get_ssh_path() -> str:
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|