kscale 0.0.6__tar.gz → 0.0.8__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. kscale-0.0.8/MANIFEST.in +14 -0
  2. {kscale-0.0.6/kscale.egg-info → kscale-0.0.8}/PKG-INFO +6 -5
  3. {kscale-0.0.6 → kscale-0.0.8}/kscale/__init__.py +1 -1
  4. kscale-0.0.8/kscale/artifacts/plane.obj +18 -0
  5. kscale-0.0.8/kscale/artifacts/plane.urdf +28 -0
  6. kscale-0.0.8/kscale/requirements.txt +10 -0
  7. {kscale-0.0.6 → kscale-0.0.8}/kscale/store/client.py +1 -0
  8. {kscale-0.0.6 → kscale-0.0.8}/kscale/store/pybullet.py +4 -1
  9. {kscale-0.0.6 → kscale-0.0.8}/kscale/store/urdf.py +12 -1
  10. {kscale-0.0.6 → kscale-0.0.8/kscale.egg-info}/PKG-INFO +6 -5
  11. {kscale-0.0.6 → kscale-0.0.8}/kscale.egg-info/SOURCES.txt +3 -2
  12. kscale-0.0.8/kscale.egg-info/not-zip-safe +1 -0
  13. kscale-0.0.8/kscale.egg-info/requires.txt +13 -0
  14. kscale-0.0.8/setup.cfg +4 -0
  15. {kscale-0.0.6 → kscale-0.0.8}/setup.py +7 -1
  16. kscale-0.0.6/MANIFEST.in +0 -1
  17. kscale-0.0.6/kscale/requirements.txt +0 -9
  18. kscale-0.0.6/kscale/store/bullet/MANIFEST.in +0 -1
  19. kscale-0.0.6/kscale.egg-info/requires.txt +0 -12
  20. kscale-0.0.6/setup.cfg +0 -15
  21. {kscale-0.0.6 → kscale-0.0.8}/LICENSE +0 -0
  22. {kscale-0.0.6 → kscale-0.0.8}/README.md +0 -0
  23. {kscale-0.0.6 → kscale-0.0.8}/kscale/api.py +0 -0
  24. {kscale-0.0.6 → kscale-0.0.8}/kscale/conf.py +0 -0
  25. {kscale-0.0.6 → kscale-0.0.8}/kscale/py.typed +0 -0
  26. {kscale-0.0.6 → kscale-0.0.8}/kscale/requirements-dev.txt +0 -0
  27. {kscale-0.0.6 → kscale-0.0.8}/kscale/store/__init__.py +0 -0
  28. {kscale-0.0.6 → kscale-0.0.8}/kscale/store/api.py +0 -0
  29. {kscale-0.0.6 → kscale-0.0.8}/kscale/store/cli.py +0 -0
  30. {kscale-0.0.6 → kscale-0.0.8}/kscale/store/gen/__init__.py +0 -0
  31. {kscale-0.0.6 → kscale-0.0.8}/kscale/store/gen/api.py +0 -0
  32. {kscale-0.0.6 → kscale-0.0.8}/kscale/store/utils.py +0 -0
  33. {kscale-0.0.6 → kscale-0.0.8}/kscale/utils/__init__.py +0 -0
  34. {kscale-0.0.6 → kscale-0.0.8}/kscale/utils/api_base.py +0 -0
  35. {kscale-0.0.6 → kscale-0.0.8}/kscale.egg-info/dependency_links.txt +0 -0
  36. {kscale-0.0.6 → kscale-0.0.8}/kscale.egg-info/entry_points.txt +0 -0
  37. {kscale-0.0.6 → kscale-0.0.8}/kscale.egg-info/top_level.txt +0 -0
  38. {kscale-0.0.6 → kscale-0.0.8}/pyproject.toml +0 -0
  39. {kscale-0.0.6 → kscale-0.0.8}/tests/test_dummy.py +0 -0
@@ -0,0 +1,14 @@
1
+ # Include top-level files.
2
+ include LICENSE
3
+ include README.md
4
+
5
+ # Include Python files.
6
+ recursive-include kscale *.py
7
+ recursive-include kscale py.typed
8
+
9
+ # Include requirements files.
10
+ recursive-include kscale requirements*.txt
11
+
12
+ # Include artifacts.
13
+ recursive-include kscale/artifacts *.obj
14
+ recursive-include kscale/artifacts *.urdf
@@ -1,16 +1,17 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kscale
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: The kscale project
5
5
  Home-page: https://github.com/kscalelabs/kscale
6
6
  Author: Benjamin Bolte
7
7
  Requires-Python: >=3.11
8
8
  Description-Content-Type: text/markdown
9
9
  License-File: LICENSE
10
- Requires-Dist: omegaconf==2.3.0
11
- Requires-Dist: email_validator==2.2.0
12
- Requires-Dist: httpx==0.27.0
13
- Requires-Dist: requests==2.32.2
10
+ Requires-Dist: omegaconf
11
+ Requires-Dist: email_validator
12
+ Requires-Dist: httpx
13
+ Requires-Dist: requests
14
+ Requires-Dist: pydantic
14
15
  Provides-Extra: dev
15
16
  Requires-Dist: black; extra == "dev"
16
17
  Requires-Dist: darglint; extra == "dev"
@@ -1,5 +1,5 @@
1
1
  """Defines the common interface for the K-Scale Python API."""
2
2
 
3
- __version__ = "0.0.6"
3
+ __version__ = "0.0.8"
4
4
 
5
5
  from kscale.api import KScale
@@ -0,0 +1,18 @@
1
+ # Blender v2.66 (sub 1) OBJ File: ''
2
+ # www.blender.org
3
+ mtllib plane.mtl
4
+ o Plane
5
+ v 15.000000 -15.000000 0.000000
6
+ v 15.000000 15.000000 0.000000
7
+ v -15.000000 15.000000 0.000000
8
+ v -15.000000 -15.000000 0.000000
9
+
10
+ vt 15.000000 0.000000
11
+ vt 15.000000 15.000000
12
+ vt 0.000000 15.000000
13
+ vt 0.000000 0.000000
14
+
15
+ usemtl Material
16
+ s off
17
+ f 1/1 2/2 3/3
18
+ f 1/1 3/3 4/4
@@ -0,0 +1,28 @@
1
+ <?xml version="0.0" ?>
2
+ <robot name="plane">
3
+ <link name="planeLink">
4
+ <contact>
5
+ <lateral_friction value="1"/>
6
+ </contact>
7
+ <inertial>
8
+ <origin rpy="0 0 0" xyz="0 0 0"/>
9
+ <mass value=".0"/>
10
+ <inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
11
+ </inertial>
12
+ <visual>
13
+ <origin rpy="0 0 0" xyz="0 0 0"/>
14
+ <geometry>
15
+ <mesh filename="plane.obj" scale="1 1 1"/>
16
+ </geometry>
17
+ <material name="white">
18
+ <color rgba="1 1 1 1"/>
19
+ </material>
20
+ </visual>
21
+ <collision>
22
+ <origin rpy="0 0 0" xyz="0 0 -5"/>
23
+ <geometry>
24
+ <box size="30 30 10"/>
25
+ </geometry>
26
+ </collision>
27
+ </link>
28
+ </robot>
@@ -0,0 +1,10 @@
1
+ # requirements.txt
2
+
3
+ # Configuration
4
+ omegaconf
5
+ email_validator
6
+
7
+ # HTTP requests
8
+ httpx
9
+ requests
10
+ pydantic
@@ -26,6 +26,7 @@ class KScaleStoreClient:
26
26
  self.client = httpx.AsyncClient(
27
27
  base_url=self.base_url,
28
28
  headers={"Authorization": f"Bearer {get_api_key()}"},
29
+ timeout=httpx.Timeout(30.0),
29
30
  )
30
31
 
31
32
  async def _request(
@@ -27,7 +27,10 @@ async def main(args: Sequence[str] | None = None) -> None:
27
27
  parsed_args = parser.parse_args(args)
28
28
 
29
29
  # Gets the URDF path.
30
- urdf_path = await download_urdf(parsed_args.listing_id)
30
+ urdf_dir = await download_urdf(parsed_args.listing_id)
31
+ urdf_path = next(urdf_dir.glob("*.urdf"), None)
32
+ if urdf_path is None:
33
+ raise ValueError(f"No URDF found in {urdf_dir}")
31
34
 
32
35
  try:
33
36
  import pybullet as p # type: ignore[import-not-found]
@@ -21,6 +21,17 @@ from kscale.store.utils import get_api_key
21
21
  logging.basicConfig(level=logging.INFO)
22
22
  logger = logging.getLogger(__name__)
23
23
 
24
+ ALLOWED_SUFFIXES = {
25
+ ".urdf",
26
+ ".mjcf",
27
+ ".stl",
28
+ ".obj",
29
+ ".dae",
30
+ ".png",
31
+ ".jpg",
32
+ ".jpeg",
33
+ }
34
+
24
35
 
25
36
  def get_cache_dir() -> Path:
26
37
  return Path(Settings.load().store.cache_dir).expanduser().resolve()
@@ -75,7 +86,7 @@ def create_tarball(folder_path: Path, output_filename: str, cache_dir: Path) ->
75
86
  tarball_path = cache_dir / output_filename
76
87
  with tarfile.open(tarball_path, "w:gz") as tar:
77
88
  for file_path in folder_path.rglob("*"):
78
- if file_path.is_file() and file_path.suffix.lower() in (".urdf", ".mjcf", ".stl", ".obj", ".dae"):
89
+ if file_path.is_file() and file_path.suffix.lower() in ALLOWED_SUFFIXES:
79
90
  tar.add(file_path, arcname=file_path.relative_to(folder_path))
80
91
  logger.info("Added %s to tarball", file_path)
81
92
  else:
@@ -1,16 +1,17 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kscale
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: The kscale project
5
5
  Home-page: https://github.com/kscalelabs/kscale
6
6
  Author: Benjamin Bolte
7
7
  Requires-Python: >=3.11
8
8
  Description-Content-Type: text/markdown
9
9
  License-File: LICENSE
10
- Requires-Dist: omegaconf==2.3.0
11
- Requires-Dist: email_validator==2.2.0
12
- Requires-Dist: httpx==0.27.0
13
- Requires-Dist: requests==2.32.2
10
+ Requires-Dist: omegaconf
11
+ Requires-Dist: email_validator
12
+ Requires-Dist: httpx
13
+ Requires-Dist: requests
14
+ Requires-Dist: pydantic
14
15
  Provides-Extra: dev
15
16
  Requires-Dist: black; extra == "dev"
16
17
  Requires-Dist: darglint; extra == "dev"
@@ -2,7 +2,6 @@ LICENSE
2
2
  MANIFEST.in
3
3
  README.md
4
4
  pyproject.toml
5
- setup.cfg
6
5
  setup.py
7
6
  kscale/__init__.py
8
7
  kscale/api.py
@@ -14,8 +13,11 @@ kscale.egg-info/PKG-INFO
14
13
  kscale.egg-info/SOURCES.txt
15
14
  kscale.egg-info/dependency_links.txt
16
15
  kscale.egg-info/entry_points.txt
16
+ kscale.egg-info/not-zip-safe
17
17
  kscale.egg-info/requires.txt
18
18
  kscale.egg-info/top_level.txt
19
+ kscale/artifacts/plane.obj
20
+ kscale/artifacts/plane.urdf
19
21
  kscale/store/__init__.py
20
22
  kscale/store/api.py
21
23
  kscale/store/cli.py
@@ -23,7 +25,6 @@ kscale/store/client.py
23
25
  kscale/store/pybullet.py
24
26
  kscale/store/urdf.py
25
27
  kscale/store/utils.py
26
- kscale/store/bullet/MANIFEST.in
27
28
  kscale/store/gen/__init__.py
28
29
  kscale/store/gen/api.py
29
30
  kscale/utils/__init__.py
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,13 @@
1
+ omegaconf
2
+ email_validator
3
+ httpx
4
+ requests
5
+ pydantic
6
+
7
+ [dev]
8
+ black
9
+ darglint
10
+ mypy
11
+ pytest
12
+ ruff
13
+ datamodel-code-generator
kscale-0.0.8/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -23,7 +23,6 @@ with open("kscale/__init__.py", "r", encoding="utf-8") as fh:
23
23
  assert version_re is not None, "Could not find version in kscale/__init__.py"
24
24
  version: str = version_re.group(1)
25
25
 
26
-
27
26
  setup(
28
27
  name="kscale",
29
28
  version=version,
@@ -36,5 +35,12 @@ setup(
36
35
  python_requires=">=3.11",
37
36
  install_requires=requirements,
38
37
  tests_require=requirements_dev,
38
+ zip_safe=False,
39
39
  extras_require={"dev": requirements_dev},
40
+ include_package_data=True,
41
+ entry_points={
42
+ "console_scripts": [
43
+ "kscale = kscale.store.cli:sync_main",
44
+ ],
45
+ },
40
46
  )
kscale-0.0.6/MANIFEST.in DELETED
@@ -1 +0,0 @@
1
- recursive-include kscale/ *.py *.txt py.typed MANIFEST.in
@@ -1,9 +0,0 @@
1
- # requirements.txt
2
-
3
- # Configuration
4
- omegaconf==2.3.0
5
- email_validator==2.2.0
6
-
7
- # HTTP requests
8
- httpx==0.27.0
9
- requests==2.32.2
@@ -1 +0,0 @@
1
- include . *.obj *.urdf
@@ -1,12 +0,0 @@
1
- omegaconf==2.3.0
2
- email_validator==2.2.0
3
- httpx==0.27.0
4
- requests==2.32.2
5
-
6
- [dev]
7
- black
8
- darglint
9
- mypy
10
- pytest
11
- ruff
12
- datamodel-code-generator
kscale-0.0.6/setup.cfg DELETED
@@ -1,15 +0,0 @@
1
- [options]
2
- packages = find:
3
-
4
- [options.packages.find]
5
- exclude =
6
- tests
7
-
8
- [options.entry_points]
9
- console_scripts =
10
- kscale = kscale.store.cli:sync_main
11
-
12
- [egg_info]
13
- tag_build =
14
- tag_date = 0
15
-
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