kscale 0.3.5__tar.gz → 0.3.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.
Files changed (43) hide show
  1. {kscale-0.3.5/kscale.egg-info → kscale-0.3.6}/PKG-INFO +1 -1
  2. {kscale-0.3.5 → kscale-0.3.6}/kscale/__init__.py +1 -1
  3. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/cli/robot_class.py +35 -0
  4. {kscale-0.3.5 → kscale-0.3.6/kscale.egg-info}/PKG-INFO +1 -1
  5. {kscale-0.3.5 → kscale-0.3.6}/pyproject.toml +2 -1
  6. {kscale-0.3.5 → kscale-0.3.6}/LICENSE +0 -0
  7. {kscale-0.3.5 → kscale-0.3.6}/MANIFEST.in +0 -0
  8. {kscale-0.3.5 → kscale-0.3.6}/README.md +0 -0
  9. {kscale-0.3.5 → kscale-0.3.6}/kscale/artifacts/__init__.py +0 -0
  10. {kscale-0.3.5 → kscale-0.3.6}/kscale/artifacts/plane.obj +0 -0
  11. {kscale-0.3.5 → kscale-0.3.6}/kscale/artifacts/plane.urdf +0 -0
  12. {kscale-0.3.5 → kscale-0.3.6}/kscale/cli.py +0 -0
  13. {kscale-0.3.5 → kscale-0.3.6}/kscale/conf.py +0 -0
  14. {kscale-0.3.5 → kscale-0.3.6}/kscale/py.typed +0 -0
  15. {kscale-0.3.5 → kscale-0.3.6}/kscale/requirements-dev.txt +0 -0
  16. {kscale-0.3.5 → kscale-0.3.6}/kscale/requirements.txt +0 -0
  17. {kscale-0.3.5 → kscale-0.3.6}/kscale/utils/__init__.py +0 -0
  18. {kscale-0.3.5 → kscale-0.3.6}/kscale/utils/api_base.py +0 -0
  19. {kscale-0.3.5 → kscale-0.3.6}/kscale/utils/checksum.py +0 -0
  20. {kscale-0.3.5 → kscale-0.3.6}/kscale/utils/cli.py +0 -0
  21. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/__init__.py +0 -0
  22. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/cli/__init__.py +0 -0
  23. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/cli/robot.py +0 -0
  24. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/cli/token.py +0 -0
  25. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/cli/user.py +0 -0
  26. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/clients/__init__.py +0 -0
  27. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/clients/base.py +0 -0
  28. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/clients/client.py +0 -0
  29. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/clients/robot.py +0 -0
  30. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/clients/robot_class.py +0 -0
  31. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/clients/user.py +0 -0
  32. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/gen/__init__.py +0 -0
  33. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/gen/api.py +0 -0
  34. {kscale-0.3.5 → kscale-0.3.6}/kscale/web/utils.py +0 -0
  35. {kscale-0.3.5 → kscale-0.3.6}/kscale.egg-info/SOURCES.txt +0 -0
  36. {kscale-0.3.5 → kscale-0.3.6}/kscale.egg-info/dependency_links.txt +0 -0
  37. {kscale-0.3.5 → kscale-0.3.6}/kscale.egg-info/entry_points.txt +0 -0
  38. {kscale-0.3.5 → kscale-0.3.6}/kscale.egg-info/not-zip-safe +0 -0
  39. {kscale-0.3.5 → kscale-0.3.6}/kscale.egg-info/requires.txt +0 -0
  40. {kscale-0.3.5 → kscale-0.3.6}/kscale.egg-info/top_level.txt +0 -0
  41. {kscale-0.3.5 → kscale-0.3.6}/setup.cfg +0 -0
  42. {kscale-0.3.5 → kscale-0.3.6}/setup.py +0 -0
  43. {kscale-0.3.5 → kscale-0.3.6}/tests/test_dummy.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: kscale
3
- Version: 0.3.5
3
+ Version: 0.3.6
4
4
  Summary: The kscale project
5
5
  Home-page: https://github.com/kscalelabs/kscale
6
6
  Author: Benjamin Bolte
@@ -1,6 +1,6 @@
1
1
  """Defines the common interface for the K-Scale Python API."""
2
2
 
3
- __version__ = "0.3.5"
3
+ __version__ = "0.3.6"
4
4
 
5
5
  from pathlib import Path
6
6
 
@@ -432,5 +432,40 @@ async def pybullet(
432
432
  last_time = cur_time
433
433
 
434
434
 
435
+ @urdf.command()
436
+ @click.argument("class_name")
437
+ @click.option("--no-cache", is_flag=True, default=False)
438
+ @coro
439
+ async def mujoco(class_name: str, no_cache: bool) -> None:
440
+ """Shows the URDF file for a robot class in Mujoco.
441
+
442
+ This command downloads and extracts the robot class URDF folder,
443
+ searches for an MJCF file (unless --mjcf-path is provided), and then
444
+ launches the Mujoco viewer using the provided MJCF file.
445
+ """
446
+ try:
447
+ from mujoco.viewer import launch_from_path
448
+ except ImportError:
449
+ click.echo(
450
+ click.style(
451
+ "Mujoco and mujoco-python-viewer are required; install with `pip install mujoco mujoco-python-viewer`",
452
+ fg="red",
453
+ )
454
+ )
455
+ return
456
+
457
+ async with RobotClassClient() as client:
458
+ extracted_folder = await client.download_and_extract_urdf(class_name, cache=not no_cache)
459
+
460
+ try:
461
+ mjcf_file = next(extracted_folder.glob("*.mjcf"))
462
+ except StopIteration:
463
+ click.echo(click.style(f"No MJCF file found in {extracted_folder}", fg="red"))
464
+ return
465
+
466
+ click.echo(f"Launching Mujoco viewer with: {click.style(str(mjcf_file.resolve()), fg='green')}")
467
+ launch_from_path(str(mjcf_file.resolve()))
468
+
469
+
435
470
  if __name__ == "__main__":
436
471
  cli()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: kscale
3
- Version: 0.3.5
3
+ Version: 0.3.6
4
4
  Summary: The kscale project
5
5
  Home-page: https://github.com/kscalelabs/kscale
6
6
  Author: Benjamin Bolte
@@ -33,8 +33,9 @@ namespace_packages = false
33
33
  [[tool.mypy.overrides]]
34
34
 
35
35
  module = [
36
- "setuptools",
36
+ "mujoco.*",
37
37
  "pybullet.*",
38
+ "setuptools",
38
39
  "tabulate.*",
39
40
  ]
40
41
  ignore_missing_imports = true
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