opensees-cli 0.3.0__tar.gz → 0.3.2__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.
Files changed (27) hide show
  1. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/PKG-INFO +1 -1
  2. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/pyproject.toml +1 -1
  3. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli/__init__.py +1 -1
  4. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli/auth.py +2 -17
  5. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli/run.py +2 -0
  6. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli.egg-info/PKG-INFO +1 -1
  7. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/README.md +0 -0
  8. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/setup.cfg +0 -0
  9. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli/__main__.py +0 -0
  10. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli/api.py +0 -0
  11. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli/config.py +0 -0
  12. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli/files.py +0 -0
  13. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli/main.py +0 -0
  14. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli/path_setup.py +0 -0
  15. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli/version.py +0 -0
  16. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli.egg-info/SOURCES.txt +0 -0
  17. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli.egg-info/dependency_links.txt +0 -0
  18. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli.egg-info/entry_points.txt +0 -0
  19. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli.egg-info/requires.txt +0 -0
  20. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/src/opensees_cli.egg-info/top_level.txt +0 -0
  21. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/tests/test_api.py +0 -0
  22. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/tests/test_auth_commands.py +0 -0
  23. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/tests/test_config.py +0 -0
  24. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/tests/test_files_commands.py +0 -0
  25. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/tests/test_main_commands.py +0 -0
  26. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/tests/test_run_commands.py +0 -0
  27. {opensees_cli-0.3.0 → opensees_cli-0.3.2}/tests/test_version_commands.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: opensees_cli
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Run OpenSees simulations in the cloud from the command line.
5
5
  Author: Minjie Zhu
6
6
  License: Proprietary
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "opensees_cli"
7
- version = "0.3.0"
7
+ version = "0.3.2"
8
8
  description = "Run OpenSees simulations in the cloud from the command line."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -1,3 +1,3 @@
1
1
  """OpenSees CLI — run structural simulations in the cloud."""
2
2
 
3
- __version__ = "0.3.0"
3
+ __version__ = "0.3.2"
@@ -268,13 +268,6 @@ def _fmt_bytes_precise(n: float) -> str:
268
268
  return f"{n:.2f} GB"
269
269
 
270
270
 
271
- def _fmt_usage(n: float) -> str:
272
- n = float(n or 0)
273
- if abs(n - round(n)) < 0.05:
274
- return str(int(round(n)))
275
- return f"{n:.1f}"
276
-
277
-
278
271
  def _usage_parts(q: dict) -> tuple:
279
272
  maximum = q.get("max_monthly_usage")
280
273
  if maximum is None:
@@ -295,7 +288,7 @@ def _usage_parts(q: dict) -> tuple:
295
288
 
296
289
  def print_quota(q: dict) -> None:
297
290
  """Print quota info to the console."""
298
- max_rt, used, reserved, remaining = _usage_parts(q)
291
+ max_rt, used, reserved, _remaining = _usage_parts(q)
299
292
  committed = used + reserved
300
293
  pct = (committed / max_rt * 100) if max_rt else 0
301
294
  rt_color = "green" if pct < 75 else ("yellow" if pct < 90 else "red")
@@ -317,15 +310,7 @@ def print_quota(q: dict) -> None:
317
310
  console.print(f" Max task timeout: {_fmt_duration(q['max_task_timeout']) if q.get('max_task_timeout') else '-'}")
318
311
  console.print(f" Max RAM: {_fmt_bytes((q.get('max_ram_mb') or 1024) * 1024 * 1024)}")
319
312
  console.print(f" Max storage/task: {_fmt_bytes(q['max_storage_per_task']) if q.get('max_storage_per_task') else '-'}")
320
- if reserved > 0:
321
- console.print(
322
- f" Monthly usage: [{rt_color}]{_fmt_usage(used)} settled"
323
- f" + {_fmt_usage(reserved)} in-flight[/{rt_color}]"
324
- f" / {_fmt_usage(max_rt)} ({pct:.0f}% committed)"
325
- )
326
- else:
327
- console.print(f" Monthly usage: [{rt_color}]{_fmt_usage(used)}[/{rt_color}] / {_fmt_usage(max_rt)} ({pct:.0f}% used)")
328
- console.print(f" Usage left: {_fmt_usage(remaining)}")
313
+ console.print(f" Monthly usage: [{rt_color}]{pct:.0f}%[/{rt_color}]")
329
314
  if q.get("next_reset_at"):
330
315
  console.print(f" Next cycle: {_to_local_date(q['next_reset_at'])}")
331
316
  else:
@@ -1,5 +1,7 @@
1
1
  """Simulation analysis CLI commands."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  import json
4
6
  import random
5
7
  import re
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: opensees_cli
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Run OpenSees simulations in the cloud from the command line.
5
5
  Author: Minjie Zhu
6
6
  License: Proprietary
File without changes
File without changes