ubc-solar-physics 1.7.9__tar.gz → 1.7.11__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 (107) hide show
  1. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/.github/workflows/build_and_publish.yaml +27 -3
  2. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/PKG-INFO +1 -1
  3. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/_version.py +2 -2
  4. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/environment/gis/base_gis.py +2 -1
  5. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/environment/gis/gis.py +4 -2
  6. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/tests/gis_tests/test_gis_driving_speeds.py +2 -1
  7. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/ubc_solar_physics.egg-info/PKG-INFO +1 -1
  8. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/.gitattributes +0 -0
  9. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/.github/workflows/run_tests.yaml +0 -0
  10. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/.gitignore +0 -0
  11. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/.readthedocs.yaml +0 -0
  12. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/Cargo.lock +0 -0
  13. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/Cargo.toml +0 -0
  14. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/LICENSE +0 -0
  15. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/MANIFEST.in +0 -0
  16. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/README.md +0 -0
  17. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/data.png +0 -0
  18. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/Makefile +0 -0
  19. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/_generate_version.py +0 -0
  20. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/docs_requirements.txt +0 -0
  21. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/make.bat +0 -0
  22. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/source/README.md +0 -0
  23. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/source/api.rst +0 -0
  24. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/source/conf.py +0 -0
  25. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/source/environment/gis.rst +0 -0
  26. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/source/environment/index.rst +0 -0
  27. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/source/environment/meteorology.rst +0 -0
  28. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/source/index.rst +0 -0
  29. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/source/models/arrays.rst +0 -0
  30. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/source/models/battery.rst +0 -0
  31. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/source/models/index.rst +0 -0
  32. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/source/models/lvs.rst +0 -0
  33. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/source/models/motor.rst +0 -0
  34. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/docs/source/models/regen.rst +0 -0
  35. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/battery_model_examples/battery_config.toml +0 -0
  36. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/battery_model_examples/battery_model_example.py +0 -0
  37. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/battery_model_examples/current.csv +0 -0
  38. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/battery_model_examples/data_py.png +0 -0
  39. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/battery_model_examples/data_rust.png +0 -0
  40. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/battery_model_examples/voltage.csv +0 -0
  41. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/data_query/current.csv +0 -0
  42. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/data_query/poetry.lock +0 -0
  43. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/data_query/pyproject.toml +0 -0
  44. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/data_query/query_data.py +0 -0
  45. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/data_query/voltage.csv +0 -0
  46. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/kalman_filter_examples/battery_config.toml +0 -0
  47. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/kalman_filter_examples/current.csv +0 -0
  48. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/kalman_filter_examples/kalman_filter_example.py +0 -0
  49. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/examples/kalman_filter_examples/voltage.csv +0 -0
  50. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/__init__.py +0 -0
  51. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/environment/__init__.py +0 -0
  52. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/environment/environment.rs +0 -0
  53. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/environment/gis/__init__.py +0 -0
  54. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/environment/gis/gis.rs +0 -0
  55. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/environment/gis.rs +0 -0
  56. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/environment/meteorology/__init__.py +0 -0
  57. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/environment/meteorology/base_meteorology.py +0 -0
  58. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/environment/meteorology/clouded_meteorology.py +0 -0
  59. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/environment/meteorology/irradiant_meteorology.py +0 -0
  60. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/environment/meteorology/meteorology.rs +0 -0
  61. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/environment/meteorology.rs +0 -0
  62. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/environment.rs +0 -0
  63. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/lib.rs +0 -0
  64. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/__init__.py +0 -0
  65. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/arrays/__init__.py +0 -0
  66. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/arrays/arrays.rs +0 -0
  67. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/arrays/base_array.py +0 -0
  68. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/arrays/basic_array.py +0 -0
  69. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/arrays.rs +0 -0
  70. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/battery/__init__.py +0 -0
  71. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/battery/base_battery.py +0 -0
  72. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/battery/basic_battery.py +0 -0
  73. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/battery/battery.rs +0 -0
  74. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/battery/battery_config.py +0 -0
  75. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/battery/battery_config.toml +0 -0
  76. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/battery/battery_model.py +0 -0
  77. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/battery/kalman_filter.py +0 -0
  78. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/battery.rs +0 -0
  79. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/constants.py +0 -0
  80. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/lvs/__init__.py +0 -0
  81. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/lvs/base_lvs.py +0 -0
  82. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/lvs/basic_lvs.py +0 -0
  83. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/lvs/lvs.rs +0 -0
  84. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/lvs.rs +0 -0
  85. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/motor/__init__.py +0 -0
  86. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/motor/advanced_motor.py +0 -0
  87. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/motor/base_motor.py +0 -0
  88. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/motor/basic_motor.py +0 -0
  89. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/motor/motor.rs +0 -0
  90. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/motor.rs +0 -0
  91. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/regen/__init__.py +0 -0
  92. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/regen/base_regen.py +0 -0
  93. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/regen/basic_regen.py +0 -0
  94. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/regen/regen.rs +0 -0
  95. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models/regen.rs +0 -0
  96. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics/models.rs +0 -0
  97. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/physics_rs/__init__.pyi +0 -0
  98. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/pyproject.toml +0 -0
  99. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/setup.cfg +0 -0
  100. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/tests/battery_config.toml +0 -0
  101. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/tests/gis_tests/test_calculate_driving_speeds.py +0 -0
  102. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/tests/kalman_filter_tests/test_basic_kalman_filter.py +0 -0
  103. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/tests/test_versioning.py +0 -0
  104. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/ubc_solar_physics.egg-info/SOURCES.txt +0 -0
  105. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/ubc_solar_physics.egg-info/dependency_links.txt +0 -0
  106. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/ubc_solar_physics.egg-info/requires.txt +0 -0
  107. {ubc_solar_physics-1.7.9 → ubc_solar_physics-1.7.11}/ubc_solar_physics.egg-info/top_level.txt +0 -0
@@ -98,17 +98,41 @@ jobs:
98
98
 
99
99
  # Now, we use cibuildwheel to build all the wheels that we want for the platforms we defined in matrix.os
100
100
  # It will build wheels for Python versions that are allowed based on our pyproject.toml
101
- - name: Build wheels
101
+ - name: Build Wheels (Windows)
102
+ if: runner.os == 'Windows'
102
103
  run: cibuildwheel --output-dir dist
103
104
  env:
104
- CIBW_ARCHS_MACOS: "x86_64 arm64" # Make sure both x86_64 and arm64 wheels are built for macOS
105
- CIBW_ARCHS_LINUX: "x86_64 aarch64" # Make sure both x86_64 and arm64 wheels are built for Linux
106
105
  CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH" MACOSX_DEPLOYMENT_TARGET="10.12"'
107
106
  CIBW_ENVIRONMENT_WINDOWS: 'PATH="$UserProfile\.cargo\bin;$PATH"'
108
107
  CIBW_BEFORE_BUILD: >
109
108
  pip install -U setuptools-rust &&
110
109
  rustup default nightly &&
111
110
  rustup show
111
+
112
+ - name: Build Wheels (MacOS)
113
+ if: runner.os == 'macOS'
114
+ run: cibuildwheel --output-dir dist
115
+ env:
116
+ CIBW_ARCHS_MACOS: "x86_64 arm64" # Make sure both x86_64 and arm64 wheels are built for macOS
117
+ CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH" MACOSX_DEPLOYMENT_TARGET="10.12"'
118
+ CIBW_BEFORE_BUILD: >
119
+ pip install -U setuptools-rust &&
120
+ rustup default nightly &&
121
+ rustup show
122
+
123
+ - name: Build Wheels (Linux)
124
+ run: cibuildwheel --output-dir dist
125
+ if: runner.os == 'Linux'
126
+ env:
127
+ # build both arches on Linux…
128
+ CIBW_ARCHS_LINUX: "x86_64 aarch64"
129
+ # …but only Python 3.12 on the aarch64 arch:
130
+ CIBW_BUILD_LINUX_AARCH64: "cp312-manylinux*"
131
+ CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH" MACOSX_DEPLOYMENT_TARGET="10.12"'
132
+ CIBW_BEFORE_BUILD: >
133
+ pip install -U setuptools-rust &&
134
+ rustup default nightly &&
135
+ rustup show
112
136
  CIBW_BEFORE_BUILD_LINUX: >
113
137
  pip install -U setuptools-rust &&
114
138
  curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=nightly --profile=minimal -y &&
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ubc-solar-physics
3
- Version: 1.7.9
3
+ Version: 1.7.11
4
4
  Summary: UBC Solar's Simulation Environment
5
5
  Author: Fisher Xue, Mihir Nimgade, Chris Chang, David Widjaja, Justin Hua, Ilya Veksler, Renu Rajamagesh, Ritchie Xia, Erik Langille, Chris Aung, Nicolas Ric, Ishaan Trivedi, Jason Liang, Felix Toft, Mack Wilson, Jonah Lee, Tamzeed Quazi, Joshua Riefman
6
6
  Author-email: UBC Solar <strategy@ubcsolar.com>
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.7.9'
16
- __version_tuple__ = version_tuple = (1, 7, 9)
15
+ __version__ = version = '1.7.11'
16
+ __version_tuple__ = version_tuple = (1, 7, 11)
@@ -33,6 +33,7 @@ class BaseGIS(ABC):
33
33
  average_lap_speeds: ArrayLike,
34
34
  simulation_dt: int,
35
35
  driving_allowed: ArrayLike,
36
- idle_time: int
36
+ idle_time: int,
37
+ laps_per_speed: int
37
38
  ) -> NDArray[float]:
38
39
  raise NotImplementedError
@@ -88,7 +88,8 @@ class GIS(BaseGIS):
88
88
  average_lap_speeds: ArrayLike,
89
89
  simulation_dt: int,
90
90
  driving_allowed: ArrayLike,
91
- idle_time: int
91
+ idle_time: int,
92
+ laps_per_speed: int
92
93
  ) -> NDArray[float]:
93
94
  """
94
95
  Generate valid driving speeds as a simulation-time array given a set of average speeds for each
@@ -105,6 +106,7 @@ class GIS(BaseGIS):
105
106
  are allowed to drive, and `False` is when we are not. Requires that (at least) the first element is
106
107
  `False` due to the race beginning in the morning before we are allowed to drive.
107
108
  :param idle_time: The length of time to pause driving upon processing a "0m/s" average speed.
109
+ :param laps_per_speed: The amount of laps that we expect to use with each speed value.
108
110
  :return: A simulation-time array of driving speeds in m/s, or an error if there weren't enough
109
111
  laps provided to fill the entire simulation time.
110
112
  """
@@ -112,7 +114,7 @@ class GIS(BaseGIS):
112
114
  np.array(average_lap_speeds).astype(np.float64),
113
115
  simulation_dt,
114
116
  np.array(driving_allowed).astype(bool),
115
- self.path_length,
117
+ self.path_length * laps_per_speed,
116
118
  idle_time
117
119
  )
118
120
 
@@ -317,6 +317,7 @@ def test_gis():
317
317
  average_lap_speeds=[speed, 0],
318
318
  driving_allowed=driving_allowed,
319
319
  idle_time=idle_time,
320
- simulation_dt=1)
320
+ simulation_dt=1,
321
+ laps_per_speed = 1)
321
322
 
322
323
  assert np.allclose(driving_speeds, np.array([[0] * 10 + [speed] * time_to_complete_lap + [0] * idle_time + [0] * 10]), atol=1e-3)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ubc-solar-physics
3
- Version: 1.7.9
3
+ Version: 1.7.11
4
4
  Summary: UBC Solar's Simulation Environment
5
5
  Author: Fisher Xue, Mihir Nimgade, Chris Chang, David Widjaja, Justin Hua, Ilya Veksler, Renu Rajamagesh, Ritchie Xia, Erik Langille, Chris Aung, Nicolas Ric, Ishaan Trivedi, Jason Liang, Felix Toft, Mack Wilson, Jonah Lee, Tamzeed Quazi, Joshua Riefman
6
6
  Author-email: UBC Solar <strategy@ubcsolar.com>