kscale 0.2.1__tar.gz → 0.2.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 (43) hide show
  1. {kscale-0.2.1/kscale.egg-info → kscale-0.2.2}/PKG-INFO +1 -1
  2. {kscale-0.2.1 → kscale-0.2.2}/kscale/__init__.py +1 -1
  3. {kscale-0.2.1 → kscale-0.2.2}/kscale/conf.py +9 -4
  4. {kscale-0.2.1 → kscale-0.2.2/kscale.egg-info}/PKG-INFO +1 -1
  5. {kscale-0.2.1 → kscale-0.2.2}/LICENSE +0 -0
  6. {kscale-0.2.1 → kscale-0.2.2}/MANIFEST.in +0 -0
  7. {kscale-0.2.1 → kscale-0.2.2}/README.md +0 -0
  8. {kscale-0.2.1 → kscale-0.2.2}/kscale/artifacts/__init__.py +0 -0
  9. {kscale-0.2.1 → kscale-0.2.2}/kscale/artifacts/plane.obj +0 -0
  10. {kscale-0.2.1 → kscale-0.2.2}/kscale/artifacts/plane.urdf +0 -0
  11. {kscale-0.2.1 → kscale-0.2.2}/kscale/cli.py +0 -0
  12. {kscale-0.2.1 → kscale-0.2.2}/kscale/py.typed +0 -0
  13. {kscale-0.2.1 → kscale-0.2.2}/kscale/requirements-dev.txt +0 -0
  14. {kscale-0.2.1 → kscale-0.2.2}/kscale/requirements.txt +0 -0
  15. {kscale-0.2.1 → kscale-0.2.2}/kscale/utils/__init__.py +0 -0
  16. {kscale-0.2.1 → kscale-0.2.2}/kscale/utils/api_base.py +0 -0
  17. {kscale-0.2.1 → kscale-0.2.2}/kscale/utils/checksum.py +0 -0
  18. {kscale-0.2.1 → kscale-0.2.2}/kscale/utils/cli.py +0 -0
  19. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/__init__.py +0 -0
  20. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/cli/__init__.py +0 -0
  21. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/cli/robot.py +0 -0
  22. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/cli/robot_class.py +0 -0
  23. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/cli/token.py +0 -0
  24. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/cli/user.py +0 -0
  25. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/clients/__init__.py +0 -0
  26. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/clients/base.py +0 -0
  27. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/clients/client.py +0 -0
  28. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/clients/robot.py +0 -0
  29. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/clients/robot_class.py +0 -0
  30. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/clients/user.py +0 -0
  31. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/gen/__init__.py +0 -0
  32. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/gen/api.py +0 -0
  33. {kscale-0.2.1 → kscale-0.2.2}/kscale/web/utils.py +0 -0
  34. {kscale-0.2.1 → kscale-0.2.2}/kscale.egg-info/SOURCES.txt +0 -0
  35. {kscale-0.2.1 → kscale-0.2.2}/kscale.egg-info/dependency_links.txt +0 -0
  36. {kscale-0.2.1 → kscale-0.2.2}/kscale.egg-info/entry_points.txt +0 -0
  37. {kscale-0.2.1 → kscale-0.2.2}/kscale.egg-info/not-zip-safe +0 -0
  38. {kscale-0.2.1 → kscale-0.2.2}/kscale.egg-info/requires.txt +0 -0
  39. {kscale-0.2.1 → kscale-0.2.2}/kscale.egg-info/top_level.txt +0 -0
  40. {kscale-0.2.1 → kscale-0.2.2}/pyproject.toml +0 -0
  41. {kscale-0.2.1 → kscale-0.2.2}/setup.cfg +0 -0
  42. {kscale-0.2.1 → kscale-0.2.2}/setup.py +0 -0
  43. {kscale-0.2.1 → kscale-0.2.2}/tests/test_dummy.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: kscale
3
- Version: 0.2.1
3
+ Version: 0.2.2
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.2.1"
3
+ __version__ = "0.2.2"
4
4
 
5
5
  from pathlib import Path
6
6
 
@@ -11,6 +11,8 @@ from omegaconf import II, OmegaConf
11
11
  # This is the public API endpoint for the K-Scale WWW API.
12
12
  DEFAULT_API_ROOT = "https://api.kscale.dev"
13
13
 
14
+ SETTINGS_FILE_NAME = "settings.yaml"
15
+
14
16
 
15
17
  def get_path() -> Path:
16
18
  if "KSCALE_CONFIG_DIR" in os.environ:
@@ -41,9 +43,12 @@ class Settings:
41
43
  if not (dir_path := get_path()).exists():
42
44
  warnings.warn(f"Settings directory does not exist: {dir_path}. Creating it now.")
43
45
  dir_path.mkdir(parents=True)
44
- OmegaConf.save(config, dir_path / "settings.yaml")
46
+ OmegaConf.save(config, dir_path / SETTINGS_FILE_NAME)
45
47
  else:
46
- with open(dir_path / "settings.yaml", "r") as f:
47
- raw_settings = OmegaConf.load(f)
48
- config = OmegaConf.merge(config, raw_settings)
48
+ try:
49
+ with open(dir_path / SETTINGS_FILE_NAME, "r") as f:
50
+ raw_settings = OmegaConf.load(f)
51
+ config = OmegaConf.merge(config, raw_settings)
52
+ except Exception as e:
53
+ warnings.warn(f"Failed to load settings: {e}")
49
54
  return config
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: kscale
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: The kscale project
5
5
  Home-page: https://github.com/kscalelabs/kscale
6
6
  Author: Benjamin Bolte
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